Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SplineController questions
#1
Hello Jake,

1. How can I move something in ... reverse? The speed value is only positive. I have my train that I made it move forward... however I also want to move backwards. Is there a way to do this?
2. 2. I manually placed the train a bit lower like this:
[Image: oyCUtjn.png]

However when I click play, it moved a bit up like this:
[Image: 7Kok8rQ.png]

I'm curious what is causing this exactly?

3. I'm trying to create a junction. I have something like this:
[Image: QO5nY9M.png]

My main problem right now is ... that I trigger the event on the junction using a Trigger Colider which is really really not ideal. Is there a way to have a code or something on the Spline Segment that will detect when another GameObject with a Spline Controller is above it and send an message to that GameObject?

Right now my Junction Movement looks like this:
https://streamable.com/sdso9

Main problem is that when the middle of the Wagon1 reaches the junction, it sends an event to all my clilds (Wagon2) to move on the Line 2 ... I need to make this event only when each of the wagon is over the junction... which is why I want to do the thing I just asked above.


I think I have other questions but those are the most important Smile

Thank You

/PET
Reply
#2
Hi,

1.) First set Speed to 0, then to a negative value. It will get positive, but direction flips.
2.) Need t check if that happens for the train example scenes as well. After all they're just a quick mockup of what can be done with custom controllers. Right now I've got no idea what can cause a offset in this place.
3.) Each SplineController has an OnControlPointReached event you can hook into. So let each Controller switch the spline individually.

Using above event you could write a "track segment" manager or such. Each time a Controller moves onto the track, it registers there. When leaving, it removes itself from the list. This way you'll know which track is busy and which not.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Working with, around, or against SplineController Livealot 2 79 07-20-2018, 06:45 PM
Last Post: Livealot
  Playmaker and general questions therewillbebrad 1 89 07-03-2018, 10:18 PM
Last Post: _Aka_
  how do I position a splineController on a spline in runtime to an exact position? hawken 8 1,572 01-19-2018, 12:01 PM
Last Post: _Aka_
  Feature request: SplineController.Position as inspector property syscrusher 4 744 01-19-2018, 06:00 AM
Last Post: syscrusher

Forum Jump: