- Home /
Question by
eliascanaza · Dec 11, 2013 at 02:49 AM ·
scenerotateturninghorizontal
Rotate object horizontal with local position and localrotation
hi... sorry for this question but i try many ways and nothigs .. i want rotate my object similar when i drag object manually on the scene and change local position X and Z.... local rotation Y
i try this .. but is wrong...
_axisX = gesture.deltaPosition.x / 30 + ObjectContainer.localPosition.x; _axisZ = gesture.deltaPosition.x / 30 + ObjectContainer.localPosition.z;
ObjectContainer.localPosition = new Vector3(_axisX,ObjectContainer.localPosition.y ,_axisZ);
_axisY = gesture.deltaPosition.x / 50 + ObjectContainer.localPosition.y;
ObjectContainer.localRotation = new Quaternion(ObjectContainer.localRotation.x,_axisY ,ObjectContainer.localRotation.z, 3);
i want rotate with mouseee
sin título.png
(35.9 kB)
Comment