Author Topic: TweenRotation question  (Read 3424 times)

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
TweenRotation question
« 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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TweenRotation question
« Reply #1 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).