using both :SetTexCoord and :SetRotation()
View Single Post
03-26-18, 01:03 PM
A Pyroguard Emberseer
Join Date: Sep 2007
You can rotate the coordinates that you're sending to
with a matrix transformation (
), which takes your input coordinates and rotates them around a central point (the middle of your coordinate pairs).
If you're rotating in 90 degree increments, you can skip doing any math and just shift the coordinates over (they're x,y pairs representing the corners of your texture). By moving the order of the
arguments by 2 you're changing which corner of the texture coordinates is being attached to which corner of your texture object.
has some lua examples if you need to rotate by an arbitrary amount, but if this all seems overwhelmingly confusing I would probably just use an animation to do it.
in the background so I don't know that they can be used together.
View Public Profile
Send a private message to semlar
Find More Posts by semlar