- Home /
rotation probleam
When I am pressing left or right arrow keys the object should rotate to that side currently I am using when arrow left or right arrows using transform.rotation it is working but the probleam is when object rotates the axis is not roating with the object due to this axis is chaging always I always want the objects front part should be always in x axis I want even when object is rotated left or right the axis should also rotate along with the object
Please post your code and a picture or a better description.
I am using transform.rotation(Vector3.up*0.1f) for roation purpose
There is no transform.rotation(). There is a transform.Rotate(). But I still need a diagram. I'm not sure this is what you want, but Rotate() does have an optional second parameter. You can try
Rotate(Vector3.up*0.1, Space.World);
You question really needs a diagram or a much better description.
Your answer
Follow this Question
Related Questions
Rotate gameobject with mouse/touch similar to meshlab or other 3D softwear 1 Answer
Return Object Rotation to x axis is zero 1 Answer
Direction of rotation 0 Answers
Rebounding Hinge Joint 2D 0 Answers
Rotating Rigidbodies 1 Answer