The geometry of my model falters as I move further away from the central axis of the world.
I model a train, Everything is attached to an empty from blender. I just need the train to move on the y axis. All works well when begin, but after about 15 or 20 minutes of travel the geometry of the train begins to tremble, as if it were running at high speeds as in reality.
The train moves on the y axis with the next simple code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class movertren : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.Translate(0,40f*Time.deltaTime, 0);
}
}
I make a two videos to show the problem: Here is the problem case, the train here is quite far from the starting point, here has been almost 20 minutes already having started the project : [link text][1]
And this should be normal behavior throughout the course: [link text][2]
Sorry my bad english, and thanks in advance . [1]: https://www.youtube.com/watch?v=n_CBJRG2mE4 [2]: https://www.youtube.com/watch?v=0_UABjfQhJA
I suspect the lack of floating precision when the position is very large.
When the train starts to shake, what is its position ?
Do you think you can scale down your world ?
Approximately in the z-axis, begins to tremble at the position: -19752.19 maybe could be that you say, but what solution could be applied to test it? Excuse my ignorance If I reduce the scale, maybe I will not have problems with the physics later.
Yeah, the floating point errors can't be avoided if the scene is set up like this. Commercial games like $$anonymous$$inecraft have the same problem (if it can be called that, as it only occurs in extreme circumstances). It's just how chips work. The solution of course would be to keep your train near the center at all times and ins$$anonymous$$d move the scenery around it.