- Home /
Why is transform.position is not so acurate?
Its simple, i have two dots a white and a red. Ive coded the red dot to go to the white dot after it gets spawned on a key-press by feeding it with the target in the inspector that's it. The problem is the red dot never gets to the exact position of the white one it maintains some distance and goes beyond the target even transform.movePosition is stoping right before the target point and i had to add the difference to make it move to the exact target's position. but i need to use rigid body forces, thankyou.
Answer by MUG806 · Feb 20, 2021 at 03:35 PM
So the white dot you are trying to follow is moving with physics? If that is the case you are probably setting the position of the red dot before the physics update happens. This way it moves to the white dot, which then moves so they are no longer in the same place.
Your answer
Follow this Question
Related Questions
transform.position any suggestions? 2 Answers
transform.position.x brings up error 1 Answer
Linecast blocked by colliders not actually in the way? 0 Answers
Newbie question 2d positioning and moving 2 Answers
Object Boundaries C# help please 1 Answer