Page 1 of 1

Change the pivot of UV coords?

PostPosted: Monday, 26.August 2013, 08:52
by Skinnytorus
Hi, All.
Another stupid question:
I wanna make a clock hand by using a rotating texture. The simple way would be to draw a stick in GlowRect, then offset and rotate it by animating Rotate op by using Loop and Atlas. But I want to take the hard way i.e. try to animate it by using the green Tex2D op. I can't understand how to change the pivot of rotation and which texture projection should be used in that case. Any ideas?
Thank you.

Re: Change the pivot of UV coords?

PostPosted: Monday, 26.August 2013, 09:23
by ikam
it works well with model projection uv, and you only need to use trans.x and trans.y to center (0.5,0.5) your pivot.

Re: Change the pivot of UV coords?

PostPosted: Monday, 26.August 2013, 09:36
by Skinnytorus
Thanks, bro. I will check your example in the evening. Have you tried that on a disc primitive? In my case, the clock hand would rotate ok but was distorted sideways (it looked like a diameter rather than a radius).

Re: Change the pivot of UV coords?

PostPosted: Monday, 26.August 2013, 17:59
by Skinnytorus
A brilliant job! Simple and elegant. And perfectly works with the disc!
Bravo! :)