2
$\begingroup$

I want to have an object follow along the curve. I'd like for the object to move at a constant velocity in the X direction regardless of the Y-displacement on the curve.

I tried using the clamp-to constraint and then parented the object to an empty. But it doesn't follow the empty 1:1 and will shoot off down the curve.

Is there someway to achieve this?

$\endgroup$
2
  • 1
    $\begingroup$ This may be fundamentally impossible to guarantee, since a curve is not necessarily expressed as x(y) function and can have multiple points with the same X coordinate $\endgroup$ Commented Aug 1, 2021 at 21:30
  • $\begingroup$ That is a great point. $\endgroup$
    – TheJeran
    Commented Aug 2, 2021 at 11:17

1 Answer 1

3
$\begingroup$

You can do this with animation nodes.

The nodes setup:

enter image description here

the "func" Subprogram defines the function you are using. The function should describe the curve in a mathematical expression, so that you can calculate your y/z value depending on your x value. For demonstration purpose i just took the timeframe as x value.

And of course i just took some "phantasie" function:

enter image description here

result:

enter image description here

$\endgroup$
3
  • $\begingroup$ Beautiful thank you. I had a hunch there was an Animation nodes work around but didn't have the time to play around yet. It looks like this method jumps from point to point is that correct? $\endgroup$
    – TheJeran
    Commented Aug 2, 2021 at 11:12
  • 1
    $\begingroup$ It calculates every point, so the bigger you make the divide value, the smoother it will run $\endgroup$
    – Chris
    Commented Aug 2, 2021 at 11:29
  • $\begingroup$ You are welcome $\endgroup$
    – Chris
    Commented Aug 2, 2021 at 11:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .