Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Local sprite clipping

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Jan 2016 01:52 Edited at: 11th Jan 2016 01:56
It's like setSpriteScissor except the coordinates for the clipping are local to the sprite. The cool thing about it is, the clipping rotates with the sprite. I had some other cool ideas in mind, but I'd need a way to rotate the sprite's UV.

It's a code snippet, but I couldn't quite get it to work perfectly so I posted here instead. I just couldn't work out how to properly manage the XY coordinates for positioning without storing additional variables, and I wanted the function to be self contained. But it's something at least, so here's a demo.






"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Crazy Programmer
AGK Developer
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 11th Jan 2016 02:16
That's really sweet. Thanks for sharing

Sign up for NaGaCreMo!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Feb 2016 08:39
nice
Saved for later.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-05-04 20:13:32
Your offset time is: 2024-05-04 20:13:32