- Home /
something to do with pivot
I have a gamobject that should be rotated by a transform euler angle, it does rotate but not in the original position, is this something to do with pivot? how to fix it? thanks
When you rotate something it rotates around it's pivot so yeah, it could be a pivot problem.
Go to your content-creation application and reset the pivot there (there should be a 'center pivot' or something along those lines).
done editing the pivot point in $$anonymous$$aya but that is not the answer to my problem
check my problem here: https://www.youtube.com/watch?v=E9uW9Vd9JuU&context=C381b6fbADOEgsToPDskI$$anonymous$$Tu$$anonymous$$$$anonymous$$9vbtjkz3dmWdb$$anonymous$$hj
Answer by aldonaletto · Feb 09, 2012 at 12:59 PM
Usually it's easier to create an empty object and child the model to it, so you can adjust the model local position and rotation the way you want:
Bottle <- this is the empty object
Model <- this is the model childed to the Bottle object
It's better to use the Bottle object for everything - attach the scripts to it, add the collider, rigidbody, etc. - thus the model becomes just a visual item, doesn't interfering with the object movement and rotation.
While it's certainly a good practice, having the mesh's pivot off-center can still cause weird behaviors, even with this setup, since the pivot is the center of the mesh. For instance, say you child the mesh object to a 'bottle' object and hit 'reset position' to find it in a weird place. It's still best to make sure all pivots are correctly centered imho.
Your answer
Follow this Question
Related Questions
Camera rotation around player while following. 6 Answers
Trying to rotate player, how? 0 Answers
Is There An OnMouseStop? 0 Answers
3ds rotation problem 1 Answer
Instantiate a GameObject at the position of one of its child objects 1 Answer