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
  Questions before buying erk13 3 9 05-15-2024, 10:38 PM
Last Post: _Aka_
  Scene 51 questions lukasynthetic 3 13 06-22-2022, 04:12 AM
Last Post: _Aka_
Wink In SplineController OnPositionReachedList Event is missing shimizu 2 14 02-07-2022, 12:47 PM
Last Post: shimizu
  best way to rotate, change offset, and inset position of splinecontroller object smackledorf 1 27 01-17-2022, 01:39 PM
Last Post: _Aka_

Forum Jump: