Space.World is still rotating localy

function OnMouseDown()
{

myGUITexture.texture = pressedTexture;
GameObject.Find(“Camera_Move_Object”).transform.Rotate(0,-45,0,Space.World);
}

I want to hit a button and set the transforms of an object absolutely, not relative.

Space.World seems to be doing the same thing as Space.Self.

It’s rotating relative to it’s current position instead of setting the rotateY attribute directly…

Any help would be appreciated.

Thanks,
Oliver :slight_smile:

transform.Rotate is always relative; using Space.World doesn’t change that, it just says it should rotate around the world axes and not the local axes. Use transform.eulerAngles to set rotations absolutely.

–Eric

awesome…thx eric… will do! :wink:

worked like a champ! :slight_smile: