Animated Steel Coaster

Welcome to the thread for the Animated Steel Coaster package!
Got questions, requests or ideas related to this asset? Just leave them here and i’ll reply as fast as possible.

Asset Store Link:

Documentation:
http://www.illusionloop.com/docs/animatedsteelcoaster.html
Facebook Page:

I created track using “Coaster Station For ZFTrack” prefab. How to control initial delay time, start/pause/restart riding?

UPD: found Station script at first track element and Send function in it…

…but how easy to restart it, if track is not loop?! it is huge problem…

Hi, sorry for the delay. For everyone who didn’t find out yet how to change the station settings:
Inside the ‘Coaster Station for ZFTrack’ object there are several ‘Station Track ZF’ Objects. Select the first one and you can scroll down in the inspector to find the ‘Station’ script with all the settings. It is also described here: http://illusionloop.webflow.io/docs/animated-steel-coaster#Tracks-And-Rails-Section

Unfortunately there is currently no method to reset the train, but i can add this to the next version.
Would reloading the scene work for you?

I just checked this: As long as the carts did not derail, you can simply reset their position and rotation by script and set velocity and angular velocity to 0.
For example:

public GameObject[] carts; //assign the carts using the inspector
void Start () { // save initial position and rotation of each cart
       startPosition = new Vector3[carts.Length];
       startRotation = new Quaternion[carts.Length];
       for (int ct = 0; ct < carts.Length; ct++) {
           startPosition[ct] = carts[ct].transform.position;
           startRotation[ct] = carts[ct].transform.rotation;
       }
   }
void ResetCarts(){// call this to reset the carts
    for (int ct = 0; ct < carts.Length; ct++) {
        carts[ct].GetComponent<Rigidbody>().velocity = Vector3.zero;
        carts[ct].GetComponent<Rigidbody>().angularVelocity = Vector3.zero;
        carts[ct].transform.position = startPosition[ct];
        carts[ct].transform.rotation = startRotation[ct];
    }
}

I will add a controller script like this in the next update

Version 2.1 is now online with these new features (Plus only)

  • Prefab with mobile optimized shaders
  • Method for resetting and sending the train at runtime

Hi,

I have a sequence of points that I want to interpolate and generate a random track that fits all points (procedural). How hard is this to do with this package?

Thanks!
Caio

Hi,
this package does not contain a curve editor. You need another package to get this functionality.
ASC Plus is compatible with Tracks and Rails: http://u3d.as/cyV
You can use the combination of both assets to instantiate curves along your path. It shouldn’t be that difficult if you can write c# scripts. You can take a look at the ‘CoasterStationLXRZF.cs’ script. it creates the station, lift and brakes when you drag the prefab into the scene. I used reflection for this script, which makes it more complicated, but you don’t have to do that.

Hi,

I want to build an exe with a limited number of iteration. For example, I want to repeat the roller coaster 5 times and then it will stop automatically. How can I do that? I appreciate your help.

Thanks.

Hi,
the length of one lap is 69.008s. To stop the animation, you can call this method after the desired time:
[your coaster object (Transform)].getComponent().SetSpeed(0);

Hi there, your package looks great and I was about to buy it, but then I watched your youtube video once again and noticed what appears to be animation errors.

https://www.youtube.com/watch?v=y7BeGF49Lks

On 0:22 (big issue) and 0:25 (small issue) it’s clearly visible the car goes off tracks for a few frames, as if it hits some obstacle, and then resumes correct path. I assume those are small errors in positions/rotations of key points in animation curves. Since on the asset store it says the animation is baked to keyframes I think that means I won’t be able to edit animations on my own. So before buying I wanted to clarify if those errors were fixed in the current package (and if so, is there a video showing the full track)?

HI,
i fixed these points as good as possible. The animation now looks like in this video:
https://www.youtube.com/watch?v=duVVh0KmKRU

The errors were caused by interpolation between keyframes. Unity sometimes rotates objects in the wrong direction when the keyframes are close to -90° or 90° (vertical). I changed the interpolation type of these keyframes to fix it.

Thanks. While the first (big) issue is fixed, there are still two smaller errors remaining, at 0:05 and 0:07. The car visibly jitters to the right for a few frames, and then resumes correct path. The rest of animation is perfect, and since the car moves smoothly along far more complex curves, I think it shouldn’t be too difficult to fix those two errors.

I apologize for bothering you because of such minor issues, but since all animation is baked and can’t be edited (I think?) I foresee already how such minor issues can become a real pain kind of ruining the entire thing. Please consider fixing those in next update. I’ll buy the asset right away when the animation is fixed.

Unfortunately it is quite difficult to fix, but i can try again.
It’s just one frame, where the cart faces exactly 90° up or down. If i remember correctly the rotation requires a small offset there, because otherwise the cart performs a ‘backflip’.
The animation can be edited, but there are lots of keyframes :wink:

Well, please give it a try then.

This is whats technically possible. I’ll upload the new version (It should be available in about a week).

https://www.youtube.com/watch?v=3xjXVP2R-Ik

Thanks. Looks good now. I bought the asset today.

Great, thanks!
The update is now available

HI,
When I want to create a track myself, I get this error:
‘Tracks and Rails’ asset was not found.Please make sure ‘Tracks and Rails’ by zen fulcrum llc is installed properly and click ‘retry’

How can I fix it?

My version is 2017.3.1f

Hi,
I assume you are using the latest version of both assets?
This might be a bug with .asmdef files, if I remember correctly. It should be fixed though. I’ll check again.
In the meantime, you could try using a different Unity version. That might fix the issue.

I just tested the package with Unity 2017.3.1f1, but it works correctly.
Can you give me more information on the issue? Did you change anything after importing or imported incomplete packages?
The script tries to find certain components of the tracks and rails asset package. The error appears if it was unable to find ‘track cart’, ‘track’ or ‘station’ scripts of tracks and rails.