How to optimize big numbers calculatation. Not exact transform position when I'm moving on a far distance from a zero point
I have a camera with one game object in child of it. When I'm moving near the start point (0,0,0) everything does right, but when I'm on thousand units from start point the child of the camera is wobbling, the furter from the start point the stronger is wobbling. I understand why it is, but i want to know how I can optimize it. Sorry for my english if something is not correct.
Answer by Cuttlas-U · Oct 23, 2017 at 07:30 PM
hi; can u show me your script ? i dont know what to optimize;
Now i can't, but i am not sure that it will help you, i just add force to my camera's rigidbody Rigidbody rig = camTransform.GetComponent(); rig.AddForce(camTransform.forward * speed); This code is similar to my code, i can't show the original, i am not at home. The problem is not in code here is nothing to optimize, at least i don't see it, but on one thousand units from the start point i have already seen the wobbling.
hi; sorry for late response; did u try Freezing the rotaition of rigidbody ?
Frezeeng is turned on, but it don't give any effect.
I can not understand why it is so hard for cpu to caldulate not so long number as several thousand with good accuracy.Every of values of my cam position is rarely bigger than several thousand units. The furter is camera the bigger is x,y and z values, so may be some method to save accuracy in big number.
i never had problems like this ! so maybe u can describe better with some screen shots ?
Your answer
Follow this Question
Related Questions
need help spawning objects with specific cordinates 1 Answer
Why won’t my distanceTraveled work? 0 Answers
Don't trust "Vector3.Distance"? 1 Answer