All I want for christmas is an animated rigid body!!

Hey everyone,

I’m having big problems here! I have a set of cars that animate in the x and y. The animation was baked in during the fbx export from max.

I want to use gravity to tell the car to basically hug the terrain whilst animating in the x and y?

At the moment I have used a seperate object called ‘weight’ that had a rigid body applied to it, and that acts as a parent for the car object with the animation attached to it. Only problem is, the weight object doesnt move, it just falls. So the car doesnt vary in height after it initially hits the terrain.

Is there any way just have the animation work in combination with a rigid body all on the same object?

Or is there a way to have the wight object (parent) follow the car (i guess that negates the whole use of it being a parent in the first place).

Or is the best idea to have an animated object in the x and y , and a car object with a rigid body applied to follow the animated object.

then I have to do it for 3000 cars :S heh small task eh?!

Any help or information regarding this, would be absolutely fantastic!

Many thanks

Chris

Rigidbody physics doesn’t always work very well in combination with kinematic animation. To keep the object pushed against the ground, you could try a raycast down from the car to the ground object. The RaycastHit object returned contains information about the point where the ray hits the ground. You can base the height of the car on that - if you do it each frame, the car will follow the shape of the road.

As for the 3,000 cars… how are you planning to construct them and add them to the scene? Not by placing each one manually, I hope :wink: