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
  Connections Problem Juton 3 14 03-06-2024, 10:41 AM
Last Post: _Aka_
  Are connections pooled? Lupos 1 3 05-09-2023, 09:18 AM
Last Post: _Aka_
  How to merge intersecting meshes at spline connections? Reign_of_Light 2 6 03-20-2023, 08:36 AM
Last Post: Reign_of_Light
  Null Ref when using Connections RKTRAINS 1 2 10-10-2022, 08:49 AM
Last Post: _Aka_

Forum Jump: