Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
one-way connections
#1
is there a way to create one-way connections?
Reply
#2
The question is a bit misleading, because there is no real one-way/two-way logic present. I guess you meant the automatic connection following for Control Points having a FollowUp defined. To add your own logic to connections:

- bind to the OnControlPointReached event
- when your eventhandler is called, check for a connection and apply your logic
- Curvy reads the event parameter and act accordingly (e.g. you can switch to another spline etc.)

See CurvyDefaultEventHandler.cs for some ideas.

Jake
Reply
#3
thanks for your reply. i did it by checking the angle between segments (got it from CurvyDefaultEventHandler).
but i thought of a way of marking the control points in a connection so that if you switch splines you can not switch back.
for example, i have two round orbits and one spline that connects them. i wanted my ship to go from lower orbit to the higher one and stay there.
Reply
#4
I recommend creating a Metadata class that holds that information and add it to the relevant ControlPoints. This way you can easily access that data in the OnControlPointReached event.
Reply
#5
(09-04-2016, 09:57 AM)Jake Wrote: I recommend creating a Metadata class that holds that information and add it to the relevant ControlPoints. This way you can easily access that data in the OnControlPointReached event.
hmmm... that's on bright idea. thank you!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error when recreating splines / connections jh092 3 3 07-25-2022, 09:58 AM
Last Post: _Aka_
Question Working with Connections burn0815 3 931 05-28-2021, 11:24 AM
Last Post: _Aka_
  SplineController slows down approaching connections jh092 5 2,538 08-07-2020, 03:56 PM
Last Post: _Aka_
Information Connections tutorial available _Aka_ 0 957 05-22-2020, 01:46 PM
Last Post: _Aka_

Forum Jump: