Detect if wheel is on ground

Christian24

19-07-2008 16:52:05

Hi,

is there a way to detect if a wheel is on the ground? Just like this is possible in Newton with isAirBorne()...

Thanks

rewb0rn

19-07-2008 17:19:35

I dont know how its done in Newton but you can declare a bool value and set it to false every frame and if there is a collision set it true.

Christian24

19-07-2008 19:13:27

Since I am a beginner I have to ask how you detect if there is a collision.
I already tried

_vehicle->getWheel(3)->getBody()->collide()
but this only checks if there was collision with a specific object.

rewb0rn

20-07-2008 09:41:41

You would have to check it in the collisions function, test for equality of the colliding geometries and your wheels geometry.

Christian24

21-07-2008 16:33:25

thanks that worked