Help on "how to create a train rail"

I’m trying to create a “train track” days, but I’m not getting it, the error is as follows.

When placing my “Mine Cart” on the “Train Rail” the “Mine Cart” begins to “shake violently”, causing the car to jump and never stop moving. Also the physics when I play in the “Mine Cart” is well outside the reality pattern (But this is something I do not know very well …)

The “Mine Cart” when in direct contact with the “Terrain” is quiet and stabilized, but when placed on top of the “Box Collider” of the rail it gets horrible …

3337682--260474--WhellinTrail.PNG 3337682--260475--WhellinTrail2.PNG
Please, if anyone can help me, here are my contacts:

WhastApp: (16) 9 9232-0223
Facebook: Redirecting...
Skype: richardwillian.2008@hotmail.com (dwillianxy)

Please, if you can respond here too, it will be of great help.

I think you should experiment with the damp and spring values. But yeah, wheels behave strange :smile:

1 Like

Don’t use Unity physics for this. Physx is not really for stable simulations but iteratively solved game simulations with lower accuracy. Here, you will have an uphill battle trying to get it working physically. You will need to ramp up iterations, constantly mess with physics materials, apply corrective velocities in code each frame and so on. Plus wheel collider is really just a thin raycast and spring joint applying force to a position on the rigidbody it is attached to.

In short stuff like trains, you want to move them based on spline tracks, not physics, and emulate the physics with transform animation. Trying to do it within the physics system is possible but requires much experimentation - put aside at least a month if that’s the case.

If you do want to make it work also make sure your layers aren’t fighting each other and so on - again it requires a lot of careful scientific testing to get right, expect to make lots of isolated tests. It’s doable but it is time consuming.

4 Likes

Hmmm, I understood more or less friend.
The point is I can not do it easily using the “Unity” prerogative tools then, right?

I’ll need to buy the “Asset” with the “Splines” right?

I’m new to these things, so I do not understand so much, but thanks for the help, can I contact you to get more questions like this?

Anyway, thank you too much, I’m going after the tool.

No I’m not saying buy assets, I’m just saying look at thinking about direct solutions based on your own experience.

1 Like

Then leave me see if I get it. You’re telling me to go trying until I find a solution using the "Unity" prerogative tools, that’s right, right?

Yes, and any free solutions (there are many). I don’t believe there’s need to spend money yet.

1 Like

I understand my friend now

I’ve been trying to do this for some time, and I can not get out of this place, I’ll try to dedicate myself more. I really do not know why I can not get him to ride the rail. If you have any idea what it is and want to talk.

Sorry for incorrect English, I’m using “google translate”.

Here are the three important parts hippo said -

  • Dont use physics.
  • Use splines for the track and the train to ‘follow’.
  • Fake (emulate) the physics with transform animation.
1 Like