Log In  

Cart #rotate_sprite-0 | 2021-02-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

I started working on a new project and was wondering how i could rotate sprites and came up with this. It's not very efficient but once the rotation is done, the rotated sprite is cached in the sprite sheet. Please use it with care :)

I hope this can be useful to someone else too! Happy coding!

P#87828 2021-02-18 04:06

good experiment
for real use, suggest: https://www.lexaloffle.com/bbs/?pid=78451 for realtime rotation, without blowing your spritesheet!
note: rotation caching is a good idea when using lua memory - many sprites can fit and be displayed in realtime (this is how I did Snow! before tline)

P#87831 2021-02-18 06:36

You can check a different way to do this here:

https://www.lexaloffle.com/bbs/?tid=38548

It's a bit more efficient

P#87840 2021-02-18 11:38

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 15:20:03 | 0.012s | Q:18