Archived

This topic is now archived and is closed to further replies.

skillfreak

cars and rotation

Recommended Posts

skillfreak    160
say i have a car. my car has four wheels. say two wheels are on a curb and the other wheels are on the ground. How do I determine the rotation of the car''s body? Any resources for this or anything would be greatly appreciated. thx. andy

Share this post


Link to post
Share on other sites
S1CA    1418
The wheels (or at least wheel arches)* form four points in space defining the orientation of the rigid car body... Join the points and you have a plane, calculating the normal vector of that is trivial since you have 4 simple edges.

The binormal and tangent vectors are two of the outside edges of the plane defined by the four points.

Normalise all the vectors and put them into a matrix - voila the car rotates applicably.


+---------+
| |
FLW FRW
| |
| |
| |
RLW RRW
| |
+------||-+


An ASCII diagram to show what I''m talking about. FLW is Front Left Wheel, FRW is Front Right Wheel, RLW is Rear Left Wheel, and RRW is Rear Right Wheel. Those are the 4 points in space.


[* Ignoring suspension and tyre pressure, you have four contact points with the surfaces the tyres are on. The basic method can still be used - simply depends on how fudgy/game like this is versus how realistic/simulation like.]

500

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites