Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: pretender on November 23, 2013, 12:42:42 PM

Title: TweenRotation question
Post by: pretender on November 23, 2013, 12:42:42 PM
Hi! This is slightly offtopic but I would like to know is it possible to use TweenRotation in such a manner to rotate object as using transform.RotateAround...so that object is rotated by an axis i specify. I want to take advantage of using tweening styles, control over animation and other stuff from ngui.

to get more specific, i want to rotate a cube around Vector3.up no matter what rotation of the cube is. Tween asks for Quarternion and i don't know how to convert.

Thank you!
Title: Re: TweenRotation question
Post by: ArenMook on November 23, 2013, 08:38:26 PM
The entire TweenRotation script is 46 lines long, including comments -- so I suggest simply copy/pasting it into a new file and changing its OnUpdate function to do just that (it's just one line of code there -- line 25).