- Home /
Why isn't my object position (transform.position) updating?
This seems like such a simple concept and I feel like I'm missing something obvious. My goal is to activate an object and have it appear in a designated location. The code (which I've provided below) activates the object, but the object doesn't move from it's original location. I'm using Unity 2D, my objects are NOT set to static & the variable for Time = 1.
(I don't remember the exact name of the variable, but I read that if it was equal to 0 my position might not update)
In addition, the information on console provided from the Debug.Log indicates that the object position is being updated. But when I view the object in the inspector the position hasn't changed. I know that I'm referring to the correct object, because "randCard.gameObject.SetActive(true);" activates the object. But the transform.position doesn't update the objects position in my scene.
Answer by Justin4Tes · May 02 at 12:51 AM
Hi @MisterTriangle ,
There might be a formatting issue with your post because I don't see any of the code you mentioned. Have you forgotten to attach it?
Your answer
Follow this Question
Related Questions
Why can't I get the transform from an instantiated object? 1 Answer
transform.position not setting position OR animation setting position even though it shouldn't 0 Answers
how to make a bolt collision teleport player to where the collision happened 1 Answer
Synchronization object animation motion (NavMeshAgent) 0 Answers
How to make my own Transform inspector without using a Custom Inspector to override Transform ? 2 Answers