# rotating texture coordinates for rectangular quad

This topic is 3798 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hello, I am drawing a screen aligned rectangle made up of four quads to which I want to apply a sort of explosion/flare texture which I then want to rotate around the centre of the screen. I am just using a single texture and changing the uvs to get my circular effect but I am not quite sure how to go about adjuting these uv to give the illusion of rotation. I was wondering if anyone could point me in the direction of any good examples (diagrams always appreciated :)) - or explain to me - how to do this, I am sure I have seen tutorials on this before* but my google skills seem to have failed me. *In fact I'm sure I recall a diagram somewhat similar to the following : It may be completely irrelevant but I figure if somebody can jog my memory on a way I have looked at before I should catch on quicker!

##### Share on other sites
Is rotating the actual quads not allowed? It seems like you could just do that instead of rotating the uvs. If that isn't going to work, you could use a 2D rotation texture matrix that is setup for the angle of rotation. Something like:

2x4
[ cosAng, -sinAng, 0.0f, 0.0f ]
[ sinAng, cosAng, 0.0f, 0.0f ]

##### Share on other sites
If I rotate the quads surely I will just end up with gaps as the rectabgle will no longer fill the screen properly? As for the rotation matrix I did try that but it didn't seem to give the desired result (don't have the code in front of me at the moment and i can't remember exactly how it looked wrong but it did), I shall go back and double check my working though.

Cheers.

##### Share on other sites
If I were in your shoes, I'd do this...

1. Have a quad that is bigger than the entire screen, but centered on the screen.
2.The quad has a circular texture that covers the screen.

- Sid

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 9
• 27
• 20
• 9
• 20
• ### Forum Statistics

• Total Topics
633395
• Total Posts
3011651
• ### Who's Online (See full list)

There are no registered users currently online

×