- Home /
How to ignore rotation while moving?
While searching through the forum I was able to find some information about moving a CHARACTER with transform.forward and such. What I want is for the platforms to line up. The problem is when I try to move the x position it moves it diagnol because it is rotated. It is for a house building system. Does anyone know a way I can move it just forward. Example:
Thank You!
asf.png
(11.0 kB)
screenshot-2.png
(229.5 kB)
Comment
If the object has a rigidbod you could try to disable the rotation from there and see if that works?
Answer by tanoshimi · Feb 13, 2017 at 10:01 AM
Move your platforms using Vector3.right
, Vector3.forward
etc. (which are in world-space and never rotate) rather than transform.right
, transform.forward
(which are in object-space and therefore affected by local rotation).
Your answer
![](https://koobas.hobune.stream/wayback/20220612110949im_/https://answers.unity.com/themes/thub/images/avi.jpg)