Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to create a moving train that slows and stops at stations
#6
(09-07-2018, 04:24 PM)_Aka_ Wrote: Hi,
In your message, I distinguish two different issues:
1- The gap appearing between cars: This is something that naturally happens with time due to consecutive operation on floats. There are different ways to try to reduce the issue. One that is already coded can be found in TrainCarManager.LateUpdate(), TrainCarManager being the script used in the scene 12_Train where it manages a train with multiple cars in it. I believe that by following that example, you can fix your issue.
Also, knowing that floats are the most precise between 0 and 1, try using Relative Position Mode and Move Mode, and see if it helps.
2- The impossibility to set a value to the position: I don't have an explanation for this. Are you sure you don't have some code setting the Position value each frame?

Thanks very much for the quick response.  1.) I will look into this but each of my "cars' in my train are already using the TrainCarManager script; including TrainCarA (which is the engine).  My obj hierarchy is: Train (with Train Manager Script applied), then its children are TrainCarA-F (each with the TrainCarManager script applied).

2.) I am using no additional scripts that affect the Train at all.  Just base Curvy scripts using the 12_Train scene as an example.

Any insight would be most appreciated!  Thanks!

An additional issue seems to be that only the engine (TrainCarA) is moving from the CP000 to CP0001 and then snapping back to CP0000.  It remains in this infinite loop while the other cars travel along the path correctly (so far, I have to watch them carefully).  Has anyone else had this issue?  See attached image for reference.


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: Trying to create a moving train that slows and stops at stations - by Novian - 09-07-2018, 06:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Heart Create beautiful curves ShiroeYamamoto 3 11 03-26-2024, 06:25 PM
Last Post: _Aka_
  Is it possible to create a road texture at runtime? artsung 1 4 01-30-2024, 09:30 AM
Last Post: _Aka_
Wink Train carriage with 2 bogies following a path arcadeperfect 9 27 08-25-2023, 02:56 PM
Last Post: arcadeperfect
  Moving object down or up the spline using gravity velikizlivuk 6 19 07-26-2023, 10:06 PM
Last Post: _Aka_

Forum Jump: