Rotating game object
Hi, Im using transform.Rotate() to rotate my game object while touching the screen. When I rotate it in X axis, I want it to rotate Y as if X was 0 sorry its really hard to explain. Im trying to freeze its original pivot, and keep rotating gameObject around original pivot
Answer by daggertok · Feb 20, 2019 at 11:29 AM
Ok if anyone gets such issue with rotating character and camera I gave it a simple fix which might be helpful for you. So I was trying to rotate my player object by swiping up-down-right-left and the result was bad cause after rotating character up its transform.forward was facing the air. Instead I made left and right swipes rotate player, and up and down swipes rotate camera up and down, which is a child of player. This fixed my issue and now it all works great
Your answer
Follow this Question
Related Questions
My rotation is not the same in inspector as it is in the scirpt 0 Answers
Rotation snapping to 180 degrees with transform.rotation 1 Answer
Rotation and Gravity Relative to the Center of an Object 0 Answers
LookAt only on local Z Axis 0 Answers
how to point the positive Y axis of an object to a direction 1 Answer