Forums

Full Version: wheel contact point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

I need some explanations about converting car coordinate information into world coordinate system.
Actually I want to get the contact point of a wheel (e.g. front left wheel) on the track.
So I took the the current position of the car (chassispos), which I assume is the centre of mass and added a vector to the front left wheel (wheel-FL position) mulitplied by the cars current chassis orientation.
It is near the contact point but something is still wrong.
So my question is:
Which point does the "wheel position vector" point at?
I thought maybe I have to add the roll-height or the wheel radius in negative z-direction(in car coordinate system)?

Thanks!
Which version of the source code are you working with? If you are using the latest SVN code (R2382 or so), here's what you do:
Code:
MATHVECTOR <float, 3> contactpoint = car.GetWheelPosition(FRONT_LEFT) + car.GetDownVector()*car.GetTireRadius(FRONT_LEFT);
I am still working with an older revision (like R1958 or so).
So I used the Vamos_Body::Car::GetState function to get an output of the car data. But maybe I'm gonna rewrite my code and use the newest version of VDrift.
Is there an easy way to get data like car position, orientation, velocity, ang. vel., current patch number etc. because I saw your not using the vamos classes anymore.
Thanks for your help with the contact point!
flo Wrote:Is there an easy way to get data like car position, orientation, velocity, ang. vel., current patch number etc. because I saw your not using the vamos classes anymore.

Yep. If anything, it's easier in the newer code.