Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Starting from the End of a Spline
#1
Hello, 
   Just trying to get to grips with your tool for a project. 

   I have a collision box on the ends of my spline, this tells the Spline Controller which spline to Play and when we get to the end Stops that spline. 

   What I would like to do is have it omni-directional, so that you can hit either collision box and go along the spline in that direction. 

   I am unable to work out how to achieve this, I know you can go backwards using speed, but what I want to achieve is to go backwards through the segments starting with the last point. 

Any help with this would be much appreciated. 

Regards,
Ian
Reply
#2
Hi,
Not sure to fully understand your needs, but it seems to me that you are missing some the following features that avoids you using that collision box:
  • Clamping: https://curvyeditor.com/documentation/controllers#clamping
  • Connections: https://curvyeditor.com/documentation/controllers#connections_handling and https://curvyeditor.com/documentation/splines/connections
  • Events: https://curvyeditor.com/documentation/controllers#events
Does this help?
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
Sorry, in my haste I've not been overly clear.

My game has a player that uses free movement (not confined by splines), then when the player hits a collision box (which is attached to a spline) I assign that spline to the Spline Controller and hit Play. Meaning the player goes along the spline, until they hit the end and then we hit STOP.

This works perfectly fine.

What I want to be able to do is start at the end of a spline and go to the beginning.

I notice that Connections have Follow-Ups where you can define a Heading Direction, is there anything similar within normal paths?

Regards,
Ian
Reply
#4
First set the object at the spline's end by setting its Relative Position to 1 (or Absolute Position to the spline's Length), and then set the Direction to Backwards. All the fields I spoke about are available through the API and the inspector.
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
Perfect, that works great.

Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 2 10 hours ago
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 16 02-21-2024, 06:25 AM
Last Post: Primrose44
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 7 02-12-2024, 09:54 PM
Last Post: _Aka_

Forum Jump: