Applying object movement without animator / using Splines

I want to put a car loop animation running along the road in the scene. I made it with Path Creator, and want it to keep moving without any trigger. I checked it works in Unity Scene, but when I export it in Needle Engine, it doesn’t work. Since I didn’t use Animator, I want to know how can I apply the movement in Needle Engine web.

Please help me! Thank you :slightly_smiling_face:

Original Post on Discord

by user 1000272623080583319

Hi, what is Path Creator?

You could for example also use just a regular animation component or a timeline.

But it sounds like you have a spline + a script that moves the object along the path, is that right?

That’s totally right! It’s my first time using Needle Engine, and I’m struggling. Can you give me an advice?

by user 1000272623080583319

Which Unity version are you using? You can either switch to Unity Splines if you are using Unity 2022 and then install the Needle Engine splines support from this repository: GitHub - needle-tools/needle-engine-modules

Alternatively it depends on how the PathCreator tool saves data, then you can script the behaviour yourself in the browser using the path data that you setup in Unity (it’s what we also do in the splines module repository above, maybe it can help you to get started too even if you decide to roll your own solution)

Or you can bake the animation to a regular animation clip with Unity Recorder :slightly_smiling_face: there are many ways.

Using Unity’s spline package with our integration as Marcel outlined above is probably the nicest for workflow.

Thank you Soooo much for your help!! I’ll try it :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :blobaww:

by user 1000272623080583319

@marcel :cactus:

I am trying as your advice, but it isn’t working. I need your help.

  1. I used Unity Splines to make my objects move along the path. I’ve checked it working well in non-Needle Engine based scene.

  2. I’ve installed the Needle Engine splines support from the link you told me, and installed the package in my project

  3. Created NpmDef Dependencies: I’ve put ‘Splines (Npm Def Object)’ Script in Element 0, Size 1, in Export info.

  4. I’ve put Unity Splines objects in one Gameobject, and added ‘Spline Walker’ script in the Gameobject.

Am I doing right? Maybe 4th step is wrong… I don’t know what to do! If there are documentation that I can refer to, please recommend me.

by user 1000272623080583319

Hi @hyoseo which version of Unity are you using? And which version of the splines package is installed? It’s possible that Unity changed some of the Splines API - I can check that when you send me your versions :slightly_smiling_face:

Thank you so much!

Here’s my version of Unity and Splines Package.

  • Unity: 2022.2.4f1
  • Splines Package: 2.1.0 October 24, 2022

by user 1000272623080583319

Thanks! Do you think you can also just open your scene real quick and click the Needle Engine/Report a bug menu item and upload the scene?

Sure! Thanks for your help :slightly_smiling_face:

by user 1000272623080583319

thanks - did you try using the automatic bug uploader?

nope, can you tell me what it is?
Sorry for the lack of information.

by user 1000272623080583319

Oh, I just did it! Please check it out

by user 1000272623080583319

@marcel :cactus: help me :frowning_with_open_mouth:

by user 1000272623080583319

Hi sorry i didnt get to it last week but it’s on the list

Changed the channel name: Applying object movement without animator / using Splines

Looking at it now - seems like you have an old engine version installed ? Which is not supported in 2022.3. I’ll try to update

Hi @hyoseo as suspected Unity changed the splines interface so the selection of the spline type didnt work anymore - it would by default always select splines to be Bezier types which is not implemented. I’ll add a fix for that

Can you try updating the modules package to 1.0.1-pre? To visualize your splines you can use ?debugsplines to the URL. It does right now only support CatmullRom interpolation tho so you’d might have to add some more spline knots to your scene :slightly_smiling_face: but then it should work
image.png