Rotating sprites? |
Rotating sprites? |
Alex Szpakowski
Guest
|
SDL_RenderCopyEx has angle and center arguments. It’s the most efficient way to do that with the SDL_Render API.
On Apr 12, 2014, at 7:14 PM, Plazmotech wrote:
|
|||||||||||||
|
Rotating sprites? |
arosian
|
As Alex noted, you can use SDL_RenderCopyEx. Check the wiki documentation:
https://wiki.libsdl.org/SDL_RenderCopyEx On 4/12/2014 6:16 PM, Alex Szpakowski wrote:
|
|||||||||||||||||
|
Rotating sprites? |
Jonny D
|
SDL_gpu uses an additional optimization that the SDL_Renderer system doesn't yet use (geometry batching). If you actually run into performance problems, you might want to try it out.
As for implementing a facing effect in 2D, look at atan2() in the C math library. It's so good. Jonny D |
|||||||||||
|