0
$\begingroup$

I have an animation with x, y f curves, so it creates a "path". Would it be possible to automatically rotate the object to always look forward? I tried to search for the answer but found only for follow path.

$\endgroup$
5
  • 1
    $\begingroup$ Hello could you please show somf screenshots to make it more understandable? $\endgroup$
    – moonboots
    Commented Jul 5 at 14:13
  • $\begingroup$ I understand what you want, but I actually have no idea how to do this. To do this you would need the tangent of the curve. When this is a Bézier spline you can evaluate this on every frame in something like Geometry Nodes to rotate the object accordingly. The problem here is you cannot "read" the F-curves in GN as far as I know, so you can only for example store the location on the previous frame and read the location on the current frame. But for the tangent you need the next frame location as well, but since this is not calculated within GN, you have no "future" location. $\endgroup$ Commented Jul 5 at 14:20
  • $\begingroup$ ...although, if you had those F-curves as keyframes on the X and Y values on a Combine XYZ node, you could theoretically use a Simulation Zone to store a named attribute for the current XY values, one attribute for the XY values of the frame before and another attribute for the values two frames before. This way you would have the current frame as future location, the frame before you take as current location and two frames before as previous location. Then you can calculate the tangent, your object would only be alway one frame behind the actual curve... I will think about it. $\endgroup$ Commented Jul 5 at 15:09
  • $\begingroup$ is animation nodes allowed as solution? $\endgroup$
    – Chris
    Commented Jul 6 at 11:23
  • $\begingroup$ To clarify your need, do you try to reproduce the Follow Path constraint with Follow Curve option activated, using GN and Graph Editor (f-curves ?) instead of a "real" curve object ? Do you already develop the GN graph with the motion, without the rotation ? This could be a good starting point to improve it... $\endgroup$ Commented Jul 6 at 13:31

0

You must log in to answer this question.

Browse other questions tagged .