Tutorial :Getting position of PhysX wheel



Question:

I'm using the NxWheelShape to simulate wheels on my car. When I render the wheel model, I use shape->getGlobalPose() to get a 4x4 matrix and render the wheel there. However this gives me the position of the shape, not where the casted ray hits other geomnetry, so even if the car behaves properly, the wheels are stationary (don't even rotate). What is the proper method of getting the wheel position?


Solution:1

Found it. Should have used shape->getContact(MyContactDesc); MyContactDesc.contactPosition is how far along Y- the ray hit something.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »