Kinetics & Collision (In 2d)

⌘-R in Chief
Posts: 1,253
Joined: 2002.05
Post: #1
I know I know, go buy Physics for Game Developers, and yes I want to, but I haven't and can't at the moment.

But anyway, my question is, when two 2d objects are moving and collide, how can I determine which direction they should go? Assuming both have equal mass (this is simple for the time being) and I have both objects' dx and dy movements, what's the equation?

I'm sorry to bug you guys, I really should know this having taken and acing both physics and trig, but it's summer, and you kinda forget these things.
Smile
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #2
For now, I suggest looking through http://www.flipcode.com, http://www.gamedev.net, and http://www.gamasutra.com, I am sure they have a few tutorials on it. It is really a bigger question than one that can be answered in a single post.
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #3
Check out a demo like SpriteTest which is part of SpriteWorld. There is pretty generic c code to do what you want. Works very well.

-Jon
Quote this message in a reply
w_reade
Unregistered
 
Post: #4
I went through this in http://www.idevgames.com/forum/showthrea...eadid=2963 a while ago. Probably ought to FAQ it, but it needs some editing to document mode... any takers?
Quote this message in a reply
Post Reply