- Home /
gravity causes transform.position not to work
Hello folks i have this very simple script that on button press it sets my character's transform.position = new Vector3(0,0,0) it works like a charm if my character collider is even 0.000001 points above ground but if it touches the ground and maybe goes a little bit beneath it, my button stops teleporting my char to 0,0,0 any thoughts?
Posting your script might help in figuring this out. As a random guess, somewhere in your script(s) you have something like an isGrounded flag that is executing code that overrides/resets the positions as well.
Your answer
Follow this Question
Related Questions
How to store position in a variable and than edit only specific part of it(such as 'x') 1 Answer
Vector3 sets to different coordinates than specified 1 Answer
Moving an Object - The right way. 2D 1 Answer
How to assign x and y transform values of an gameobject to user defined variables? 1 Answer
Play animation as the value changes from 0 to 1 with changing GameObject's position in unity 0 Answers