• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

ball physics help?

Status
Not open for further replies.
Level 4
Joined
May 17, 2005
Messages
94
Also, if the walls aren't all perpendicular to each other, there's still a fairly easy way to determine some rebound angle "C" given the angle of the wall "A" and the angle of the ball's motion "B".

C = 2A - B

It works fine whether the angle is measured in degrees or radians, positive or negative, and in any range (ie -630 instead of 90 degrees). However, it's also possible and easy for it to return values outside of the normal ranges (such as -630 instead of 90), so you could always do something like Mod(Angle,360) if you want to keep it within the normal range.
 
Level 14
Joined
Jan 5, 2009
Messages
1,127
IDK but this might work. But idk if it is true...

attachment.php

Made in MSPaint
 

Attachments

  • Theoie.PNG
    Theoie.PNG
    7.2 KB · Views: 135
Level 19
Joined
Feb 25, 2009
Messages
2,004
im using a cliff, but polar projections so I'll do what uberfoop mentioned. just wondering, what do you guys think is the best thing to use as an event? and to detect the angle of the wall...

Detect when the specified 'ball' unit takes damage, also I keep an old bouncing system on my PC, if you would like to see it, I can share it with you.
 
Status
Not open for further replies.
Top