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 / SpriteboxShape for multi sprite sheet

Author
Message
James Tighe
9
Years of Service
User Offline
Joined: 22nd Jul 2015
Location: Portsmouth, Hampshire, UK
Posted: 27th Jul 2015 13:27
Hi Guys,

I have yet another question that I am hoping someone can answer for me.

I have loaded my sprites from a sprite sheet and am having issues with the collision detection. The sprites are in a grid of 30x40pixel and load fine and can be used for animation without any issues.

The problem I have is regarding the collision boxes. The jump animation is taller and different shaped than the standing frame. If I use SetSpriteShape(sprite,3) it is fine for the standing sprite. But if the sprite changes to a frame that is a different shape the collision doesn't change making it wrong.

Currently I am having to run SetSpriteShape(sprite,3) at each action where the frame changes. This works but is there any easier way to do this?

Thanks

James

Brian Kuh: If anybody wants to see, there's a Donkey Kong kill screen coming up.

Login to post a reply

Server time is: 2024-11-25 19:34:37
Your offset time is: 2024-11-25 19:34:37