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 …
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.
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”.