- Home /
Local rotation while keeping the y variable doesn't work QUITE right
Just to explain quickly, I'm trying to get an object to change rotations whenever the object hits a checkpoint. The checkpoint changes the X and Z local variable into it's own, so it should turn the rotation into let's say... x = 0.4 z = -0.1. But the issue is that I'm trying to keep the local y axis, and the object changes the local rotation into x = 0.3 z = 0.1. Despite me telling it otherwise. I have tried rotating the object back to it's initial local Y rotation, and I get the same result. Just as a note, if I change the objects local rotation as a whole it's fine, but the moment I try to keep the local y rotation, it just goes all wonky.
There's alot of ways to change the rotation, so some code would probably help to better understand the problem. e.g. Are you using quaternion or euler?