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 / front and back of sprite

Author
Message
codemypantsoff
12
Years of Service
User Offline
Joined: 21st Jul 2012
Location:
Posted: 24th Jul 2012 21:13
Is there a way to figure out the top left x and y and the bottom left x and y for a sprite that is on the screen and is rotated?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Jul 2012 22:16
GetSpriteX/Y will return the top left X/Y values.

Then use GetSpriteWidth and GetSpriteHeight to get width and height. Add those to the X/Y from top left to get the bottom right.

The angle of the sprite (rotation) should not matter, the actual top/left for the sprite as it appears is returned by the GetSpriteX/Y commands.

Cheers,
Ancient Lady
AGK Community Tester

Login to post a reply

Server time is: 2024-11-23 19:45:24
Your offset time is: 2024-11-23 19:45:24