Question by
gaiastellar · Nov 16, 2018 at 01:00 PM ·
rotationeuleranglesquaternions
problem setting rotation
hi all, im simply trying to set the rotation for an object in the transform, in code rather than manually, for example to 0, 90, 0;
transform.rotation = Quaternion.Euler(new Vector3(-90,0,0));
but the 90 comes out as 90.00001 in the inspector?
ive also tried transform.Rotate(new Vector3(-90,0,0));
but the same thing happens.
am i doing something wrong? is there a way to set it precisely?
thanks for any help.
paul uk
Comment
Best Answer
Answer by dan_wipf · Nov 16, 2018 at 02:50 PM
is it not transform.rotation = new Quaternion.Euler (-90,0,0); ?