I’m a bit lost and can’t seem to find a solution online for my application…
I want a long object to slyther along a spline. The object does move along the spline, however it doesn’t bend (it’s a simple skeletal mesh). It is always straight and static which doesn’t really feel realistic. Is there no way to do this almost like how curves work in blender?
Thank you! I have seen this before, however I struggle with adapting it to my case since I don’t want it to be replicated on a curve, I just want a fixed mesh to move along the curve (imagine a snake for example following a path). The snake does not get replicated or changed.
Set up some basic IK (or just line traces if using static meshes).
You can then just
Trace to the floor to get the “snake” not to float.
And, you can offset along the closest point on the spline using the same system, which I think is what you are asking for.
Please do consider the fact that tracing 30 segments is crazy expensive.
And that if you steal the math for the spline, you could apply the same math to a shader (if collision isn’t needed) given just the start point, end point, and spline transforms.
With regards to replicating or changing - a skeletal mesh changes constantly. The vertex adapt to where the math behind it tells it they should be.
A static mesh on a spline (tube) will also potentially always change, as its vertex are driven by rhe spline positioning - that’s why spline meshes can’t be instanced unless you place instances along a spline.