Velocity of a point.

Started by
2 comments, last by oliii 15 years, 9 months ago
Hello guys, In reference to this article I'm a little confused as to how the author has calculated the velocity of a point on a rigid body. http://www.gamedev.net/community/forums/topic.asp?topic_id=470497 I understand the traditional method ok. VelocityPoint = AngularVelocity * (PositionOfPoint - OriginOfObject) + LinearVelocity. However the author uses this method. "This point velocity is a combination of the linear velocity and the angular velocity. But the angular velocity is multiplied by the distance the point is from the center of rotation and perpindicular to it’s offset direction. So to kill 2 birds with one stone, I simply find the orthogonal vector to the point offset and multiply it by the angular velocity (then add the linear velocity.)". //velocity of a point on body public Vector PointVel(Vector worldOffset) { Vector tangent = new Vector(-worldOffset.Y, worldOffset.X); return tangent * m_angularVelocity + m_velocity; } Can anyone shed some light on this? My poor little brain can't comprehend whats going on. Thank you kindly.
Advertisement
you need the perpendicular vector of (PositionOfPoint - OriginOfObject), not (PositionOfPoint - OriginOfObject).

-> perp(v) = Vector(-v.y, v.x);
-> pvel = linearVelocity + perp(PositionOfPoint - OriginOfObject) * angularVelocity;

in 3D, it would be the cross product (whihc gives you a perpendicular vector).

-> pvel = linearVelocity + (pcoll - centre) x angularVelocity;

Everything is better with Metal.

Ahhhh... thanks ever so much. That makes more sense.
no problemo

Everything is better with Metal.

This topic is closed to new replies.

Advertisement