Tutorial :Getting position of PhysX wheel


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?


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
Next Post »