• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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: 142
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