Posts: 3
Threads: 2
Joined: Apr 2019
I have a player controlled object moving along a spline. Being locked to X and Z is perfect but I want it to be able to fall and jump.
All I've been able to do is edit the offset which won't work in this situation because it's always relative to the spline. I want the Y axis of the object to be totally independent of the spline if possible.
Posts: 2,113
Threads: 92
Joined: Jun 2017
Hi,
There is no option to selectively choose the dimensions that the controller modifies. You can override the controller's InitializedApplyDeltaTime method so that it saves the controller's Y coordinate at the method start, and applies it at the method end.
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 3
Threads: 2
Joined: Apr 2019
Thanks for the answer. I think what I'll do instead is copy a technique I saw elsewhere, where the object turns so that "forward" is always towards the nearest point on a spline. Would something like this be possible with Curvy?
Posts: 2,113
Threads: 92
Joined: Jun 2017
Yes, you can override InitializedApplyDeltaTime also to modify the rotation after each update. You can see an example of getting the nearest point on a spline if you look at the provided example scene 05_NearestPoint.
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 46
Threads: 13
Joined: Jan 2020
01-30-2020, 06:47 AM
(This post was last modified: 01-30-2020, 06:47 AM by ATHellboy.)
(05-13-2019, 07:10 PM)clearleaf Wrote: Thanks for the answer. I think what I'll do instead is copy a technique I saw elsewhere, where the object turns so that "forward" is always towards the nearest point on a spline. Would something like this be possible with Curvy?
I'm excited to see if you have implemented jump and fall or not ?
Posts: 2,113
Threads: 92
Joined: Jun 2017
It's not a feature, but it is implemented in an example scene, 50_EndlessRunner
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 46
Threads: 13
Joined: Jan 2020
(01-30-2020, 10:22 AM)_Aka_ Wrote: It's not a feature, but it is implemented in an example scene, 50_EndlessRunner
As I figured out, OffsetRadius is based on Y axis of spline. So using OffsetRadius doesn't help me to implement jump and fall.
I've checked out scene 50_EndlessRunner but it is not a good jump really. As I said when the character is on air it should not depends on Y axis of spline or ground if it depends on Y axis then jumping effect is incorrect. As you can see in this gif from scene 50_EndlessRunner (I just change the spline a little bit for showing incorrect jumping): https://gyazo.com/acf01a2dbb59e06e086e75e5f821928f