Object transforms changed despite not having been touched
Hi there,
I'm having a bit of confusion more than a problem, but I feel it's going to affect my workflow (sanity) if I let it be.
I've made a small game area where all the game objects were scaled and moved by simple numbers (20, 1.5, 4, etc.) so all the pieces 'snap' together and I avoid any gaps. I didn't notice any big sudden changes with the scene, however after writing a script to open a door I noticed all the transforms for my game objects had wildly changed.
The game hadn't changed look and everything still 'snaps' together for now, but making any additional geometry or prefabs to the scene is going to cause a lot more hassle!
Having come from Blender, I'm aware that you have to occasionally make sure your transforms are 'set' after scaling and rotating and such, however the numbers here still don't seem to add up considering how wild the numbers have become, with game objects right next to each other having completely different positions.
I hope someone can shed some light on this issue, and I'm hoping it's nothing more than my lack of knowledge.
Thanks in advance,
Cam :)
Answer by camashthelion · May 19, 2020 at 04:00 PM
Guess my persistence paid off! Turns out grouping my level and door assets under an empty caused the transforms to go all out of whack. I'm guessing the empty's position was off when I added other game objects to it.
Anyway, resetting everything to zero and repositioning it sorted it out. A bit of a hassle, but it works! Hope my lack of knowledge can help someone else suffering the same problem. :p
Your answer
Follow this Question
Related Questions
Lerp Random Position - Within Original Vector3 1 Answer
How can I work with the opposite angle? 0 Answers
transform.lookat not working? 0 Answers
how can my move a obect alon with the player 2 Answers
how to fire bullet according to rotation of the gun 0 Answers