Collision response

Started by
4 comments, last by kirenemook12 12 years, 5 months ago
hello everyone,

I am trying to make a good collision response, but i have some problems.
A lot works, thanks to the site http://www.euclidean...hreed/index.htm, but now am i stuck, because the movement is in the wrong direction.

that site uses a vector 'n', which is supposed to be the direction vector of the impulse (i think), but how do I calculate that vector 'n' ?
Advertisement
By subtracting the objects positions from each other.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

that seems to work when the objects hit in the center, but when they hit farther away from the center, they get extremely high speeds.
i have calculated 'n' as n= PositionA - PositionB
and the vectors 'ra' and 'rb' by subtracting the position of the object from the coordinates of the collision point, i don't know if that has anything to do with it.
Try normalizing 'n'. That way the objects will always have the same speed.
I have tried that, and it didn't work.
when i was checking the thing out again, i saw that the rotation speed wasn't initialized, that caused the extreme speeds. thanks for the solution for calculating the 'n'.

This topic is closed to new replies.

Advertisement