Transforms update problem
Hello there i have a HUUUUGE issue.
So i am working on my project and in my script i am transforming my camera. My camera is parented in two groups - camera_pivot and camera_offset. As i am transforming those i want to then in the same script read the values (or at least world position of the camera inside two other groups) too see if its colliding with a wall...
After debugging and pausing the game i realized that transform.position and transform.rotation returns wrong values... I made a cube - snapped it to those read values and they are not the values I assigned just few lines above in my script...
How is this possible? How can you make a game if you can't read object's world position and world rotation after assigning them? The issue seems to be most prominent if the object is parented in the hierarchy but still i question even un parented objects...
Is it the update problem? That you assign value and you need to wait for the game loop to go through to update locals and worlds values on the transform? Why isn't it recalculating it properly right away?
K.
Your answer
Follow this Question
Related Questions
Why does my transform.lookat not work? 1 Answer
Transform.Rotate x and y rotate z, where z is 0 0 Answers
Limit game object to camera view 0 Answers