0
$\begingroup$

I'm trying to have an object swoop in and then begin following a path. This post kinda sorta seems relevant, but I have an added hitch.

I've got a Bezier curve that is moving, and I'm doing so via a cycles modifier. This is part of an "infinite loop" animation where the roadway appears to be going on forever. Imagine an Outrunner-type video game-looking scenario where the road keeps coming.

The "road" is an array-modified plane that is deformed along the bezier. That whole thing is a collection:

bezier road following collection

All the objects in this collection are parented to an empty axis. That axis moves (which moves the roadway), and that movement is a cycled animation (every 60 frames). The object moves into the frame, and at some point, the object should then begin to follow the path.

The challenge I'm having is when I get near the next cycle where the roadway "resets" and moves back to where it starts from. The object is "ahead"/in front of the camera a bit:

object in front of camera

The object gets to the end of the Bezier curve and then cannot be offset any further, so it ends up leaving the path:

object off path

I tried using an array modifier on the Bezier curve to make it repeat, but the follow path constraint (for the object) doesn't seem to understand or acknowledge the array modifier (for the Bezier it's constrained to). While it LOOKS like the Bezier continues, that's actually a different instance of the "RoadObject" collection, so that bezier is not what we're following.

If I modify the transform (location/rotation) of the axis following the path at all in between the time where we are leaving the path and the time the path resets several frames later, it totally screws up the orientation of the object for future path following, so that doesn't seem to work, either.

I realize this all sounds like a mega hot mess. Here's a simplified example file that mostly achieves the same challenge. At frame 89, the Suzanne is at the end of the current curve, but it's not until frame 119 before the cycle resets again. The Suzanne should continue to follow the path "forever" (until some frame in the future where I'll essentially keyframe the influence back to zero).

$\endgroup$
1
  • $\begingroup$ why don't you just make the beziercurve longer (e.g. turn into mesh, array modifier), turn into curve again and then adapt your animation to that? that's much easier. $\endgroup$
    – Chris
    Commented Dec 22, 2023 at 6:27

1 Answer 1

0
$\begingroup$

There is a stupid/simple solution to this problem: double the length of the path being followed, but "reset" the camera in the middle. In other words, the cycle is still looping at the same physical point in space, but the real object is now twice as long. This allows the real path (not another instance of the path) to extend much further past the camera, so now the follow path constraint can still work.

$\endgroup$

You must log in to answer this question.

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