- Home /
Is it possible to keep an object upright inside another game object that is spinning or rolling
An example would be like a pet hamster ball where ball rolls however game object or hamster remains strait and upright. So far any object I put roll or spins with object even if rotation on rigidbody is locked.
Answer by ScroodgeM · Aug 30, 2012 at 08:13 PM
object that rolling: A
object that should keep upright: B
solution 1: detach B from A and attach A and B to some empty C, move C, rotate A, B will be moved but not rotated
solution 2: make simple Update() in B and set it's rotation every frame
Or if you get the rotation from A and invert it onto B maby?
this is unneeded operation. ins$$anonymous$$d of make
transform.localRotation = [inversed parent rotation]
you simple can use
transform.rotation = Quaternion.identity;
Your answer
Follow this Question
Related Questions
Limiting RotateTowards on two axes 1 Answer
Rotate Around Local Y Axis 4 Answers
Rotating Player Controller locally or globally. 0 Answers
Space Camera Issue. 1 Answer