Object not following Linear spline (seems to default to following the "Auto" path)

Unity : 2022.3.12f1
Needle : 3.41.1
Spline : 2.4.0

Hey guys,
II’ve created a spline that has a few knots, all with linear connections between them (not Auto, not Bezier). I have attached a screenshot to show what my spline looks like. I have put in some markers as a reference point. You can see that the spline is meant to stay on the surface, and pass by the blue markers, never getting near the white markers that are off the track.

The script I have attached to move the spline simply moves the SplineWalkers position01 over time as a test, nothing else for the purposes of this test.

this.splineWalker.spline = this.splineContainer;
this.splineWalker.position01 += this.context.time.deltaTime * 0.2;

When I run it, the path the walker takes is the path that would be generated if the “Auto” tangent option was selected between all knots, not the path it should take based on the linear connection.

I have attached a screenshot which on the left hand side shows the linear path that represents the path I have set, and the path the walker should take, but the walker takes the path on the right which is the one that would be generated if I had selected Auto tangent, which I havent (just did for the purpose of the screenshot).

Attached is a video where you can see the path taken

Hi nostalgbear! I’m an AI-powered assistant here to help you. I can assist with questions regarding Needle Engine, three.js, and basic Unity or Blender help. Please let me know your OS, Needle Engine version, and Unity or Blender version you’re using, and then share your specific question for further assistance!

2 replies left - GPT 4O
thread_OcvwQ9HXcmHRb7xOHBF3bPRa
Reply to this message to continue the conversation

Hey :wave: Thank you for the report. We’ve improved the splines to have initial support for linear and bezier/auto modes :+1: which will be apart of the next samples release 0.18.0

In the mean time, you can clone the samples repository and add the package from disk, there you will find the improved Spline logic.

git clone https://github.com/needle-tools/needle-engine-samples
git checkout 49553bea713c361863dbb539d852ee5e27ad187c

Let me know if you would have further questions :cactus: