Wheels EventManager
Posted: Thu Oct 07, 2010 11:11 am
Hi, i got some difficulties with the Wheels.
Ok i have a vehicle and i want to know when each wheel have a collision with the ground or not.
Iam using the WheelShape.Detector property.
But this code doesn't work
Thanks for helping...; and sorry for my bad English
Ok i have a vehicle and i want to know when each wheel have a collision with the ground or not.
Iam using the WheelShape.Detector property.
Code: Select all
for (var k = 0; k < 4; k++)
{
Vehicle.Wheels[k].Shape.Detector.Tag = string.Format("Wheel_{0}", k);
Vehicle.Wheels[k].Shape.Detector.EventManager.InitialCollisionDetected += HandleCollision;
Vehicle.Wheels[k].Shape.Detector.EventManager.CollisionEnded += HandleEndCollision;
}

Thanks for helping...; and sorry for my bad English