How to attach object to spline path?

Hello guys,

I have two questions. I will make a game like rollercoaster but I need to attach my object to spline path. How can i do it ?

And i want to: It will be play gravity. When i touch to screen, it will go along the way. Please help…

what is a spline path? a new Unity feature? because if it is that’s pretty cool

anyway the spline path should have a function, you give it a float from 0 to 1, and it returns a Vector3 position … 0 is the start of the spline, 1 the end

so you just give the function the touch X screen position divided by the screen width

It’s existed in some form for a while. A couple years back I was working on something to animate a character going down a slide, and I used an Animation Curve. I’ve also used one to define a character’s jump height, and movement speed.

But that project has vanished, so I can’t help OP at the moment.

1 Like