dinvog
24-03-2007 06:41:03
Hey,
I am creating a small game application which consists of only tunnels/tubes and no gravity. So the car models are free to roam inside the tunnel. However I wanted the car to always be in contact with the surface. I removed gravity and I have tried a variety of things.
I tried to make the tunnel a magnet and the car magnetic. But the car shows erratic behaviour as it oscillates. And it stays in the middle of the tunnel.
I thnen tried to use a material but realised that meshShape does not have the parameter and using a such a material on the car does not have the desired effect.
I then tried to use a combinatin of angular damping, add force and freeze rotation.No luck there either
I now am tring to figure out a way to find the contact point between the two meshes and add a force to its normal so the car always sticks. I was looking up the contact pair procedure to see if it gathers information about the contact point.
Any better ideas?
I am creating a small game application which consists of only tunnels/tubes and no gravity. So the car models are free to roam inside the tunnel. However I wanted the car to always be in contact with the surface. I removed gravity and I have tried a variety of things.
I tried to make the tunnel a magnet and the car magnetic. But the car shows erratic behaviour as it oscillates. And it stays in the middle of the tunnel.
I thnen tried to use a material but realised that meshShape does not have the parameter and using a such a material on the car does not have the desired effect.
I then tried to use a combinatin of angular damping, add force and freeze rotation.No luck there either
I now am tring to figure out a way to find the contact point between the two meshes and add a force to its normal so the car always sticks. I was looking up the contact pair procedure to see if it gathers information about the contact point.
Any better ideas?