The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.31 (Linux)
|
wheel contact point - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4) +--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9) +--- Thread: wheel contact point (/showthread.php?tid=1097) |
wheel contact point - flo - 03-24-2009 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! - joevenzon - 03-25-2009 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); - flo - 03-25-2009 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! - joevenzon - 03-25-2009 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. |