Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving freely on the Y axis?
#1
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.
Reply
#2
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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
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?
Reply
#4
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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
(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 ?
Reply
#6
It's not a feature, but it is implemented in an example scene, 50_EndlessRunner
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#7
(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
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Moving multiple controllers at once Lupp_ 23 3,187 02-10-2020, 11:19 PM
Last Post: _Aka_
  Trying to create a moving train that slows and stops at stations Novian 11 6,123 12-12-2019, 06:40 PM
Last Post: _Aka_
  Debug message when moving over CP not working. funkd 5 1,748 07-12-2019, 11:15 AM
Last Post: _Aka_
  Moving spline controller with parent game object jvalenzuela 7 5,906 06-02-2018, 10:44 PM
Last Post: _Aka_

Forum Jump: