using both :SetTexCoord and :SetRotation()
View Single Post
03-26-18, 01:17 PM
Join Date: Oct 2006
Originally Posted by
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.
Yes, this is probably best for 90 degree increments. You put what coordinates you would like as your top left, for example. (:SetTexCoord() can accept 8 arguments rather than 4.) You might even be about to use this for other rotation angles, if your math is correct.
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff,
The Tao of Pooh
View Public Profile
Send a private message to Seerah
Find More Posts by Seerah