How can I move an object along a path without it falling through?

    I'm trying to make R2D2 move along a path on a curve, but I'm having  trouble making sure he conforms to the physics and shape of the path.   As you can see in the screenshot, it's hard to make him adjust to the  shape of the path without sinking into it or floating over it due to the  height of the curve and the difficulty in matching it to the path's  shape exactly.


I’ve tried duplicating one of the edge loops of the path mesh and then converting it to a curve, but for some reason it sends whatever you parent it to flying into outer space. I also used constraints (follow path and locked track) but still it makes the empty and R2D2 fly everywhere and warp. FYI, I also scaled everything so it’s not that issue either.

What I’m wondering is whether or not there is a very simple way to make sure your character gets from one side of the scene to the other while respecting rigid body physics?

if i remember something about conforming car suspension, i think you could use and item/empty w/ a shrinwrap modifier to the terrain, then parent the robot to that.

Well you can shrink wrap the curve to the floor and make the origin of the robot on the very bottom

Moved from “General Forums > Blender and CG Discussions” to “Support > Animation and Rigging”

Curves that you use with a follow path constraint need to be centered, ie to have applied location and rotation (ctrl+a). For the banking you could use two bones aligned with the wheels, shrinkwrapped to the floor, and have the main R2D2 controller follow the angle between them.

Yeah I tried using that too and I was able to make R2 get pretty close to the path but he still doesn’t rotate on the X axis to the shape of the path.

Hm I tried to do this, but it doesn’t seem to be working. Is there a more detailed example you could send or point me to a tutorial on this? Thanks

Here, rig_conform_to_floor.blend (863 KB)

You should add a child bone to the “R2D2” bone to animate some overlaps. No geometry should be attached to the “follow” bone, it just serves as a guide for the other bones. I think R2 has pistony legs too, but I didn’t include those…

Hadrien

By the way not sure whether it’s a bug, but bones constrained to a curve with a follow path constraint don’t seem to see the modified curve… which is why in my example I removed the shrinkwrap and just stuck the CVs to the ground. I think I remember this working correctly in the past, no ?

Oh awesome I see what you’ve done here. Thanks that helps so much. One question though; what is the offset factor for in the F-Curves? Sorry I don’t have much experience with modifiers in the graph editor.

It’s the animation of the bone along the path itself, going from 0 to 1 (ie from beginning to end of the curve), not a modifier. Modifiers only lie in the modifiers tab.

Ah I see. Thanks again