1
$\begingroup$

So what I want to do is make two objects not clip when touching each other, instead "following" the shape of the mesh.

gif

Basically I want the cylinder shown in this example to go over the pipe when moving it on the Y axis, in this example I actually animated the cylinder going over the pipe but I don't want to do that because it'd cause clearly unwanted clipping (as you may see from this animation) and would also take extra pointless time when animating.

I've tried the Floor constraint, which only works as a plane and doesn't understand the mesh's geometry (+ it sticks and flips weirdly which isn't exactly what I want for this, but that might be just of the way used it :P). I've also tried the ShrinkWrap contstraint which just sticks weirdly to the mesh and flips on the other sides of the mesh (which is pretty much how it's supposed to work, not what I need for my animation though).

So anyone got an idea on how I can achieve this collision effect? I've been looking through Blender constraints and such for more than an hour and couldn't find a single one which does this effect.

$\endgroup$
0
$\begingroup$

The Follow Path constraint comes close to what you want to achieve.

Advanced Follow Path Setup

  1. We need a path (curve object) to follow. If you have a mesh, you need to convert it. Go into edit mode (Tab) and select an edge loop with Alt+Click, which you want the object to follow.
    enter image description here
  2. Duplicate it the edges. Shift+D
  3. Separate the duplicated edges. P > Selection
  4. Go into object mode and select the separated edge loop.
    enter image description here
  5. Convert it to a curve. Alt+C
    This will generate a Poly curve.
    enter image description here
  6. [Optional] is probably a better approximation of the needed path if the curve is a bezier with automatic handles. Go into edit mode of the curve. From the Tools menu, click on Set Spline Type > Bezier
    enter image description here

    Select all vertices (A) and set their Handles to Auto in the Tools menu.
    enter image description here
  7. In case the origin of our object is in the center and has to be offset from the ground, we will use a simple rig of empties. Create two empties and parent one (circle) to the other (cube). Ctrl+P
    enter image description here
  8. Select the parent empty (cube) and add a Follow Path ** constraint.
    enter image description here
    Set the **Target
    property to the created curve. Check Fixed Position. The empty snaps to the start of the curve. By changing the Offset property, we can slide the empty along the path. Animate the Offset property, from 0 to 1 over the duration of the scene.
    enter image description here
  9. Position the mesh correctly above the ground at the starting position. Snap the cursor to the mesh's center. Then snap the child empty to the cursor. Add a Copy Location constraint from the child empty (circle) to the mesh.
    enter image description here
    The rotation of the mesh can be easily animated.

enter image description here

$\endgroup$
  • $\begingroup$ Thanks for the help! I actually managed doing exactly what I wanted by adding just a very little depth to that certain curve from step 6 and used a shrinkwrap constraint to that :D. $\endgroup$ – Wiirexu Dec 16 '16 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.