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 / there is a sprite animation. the sprite will change the position in the image.

Author
Message
halley
12
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 19th Oct 2011 09:07
how do I set the shape of the sprite ? and how to solve the collision between two sprites?

give my best
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th Oct 2011 15:19
Halley, are you using physics or ordinary sprite collision?

Also what do you mean by "solve the collision"?

halley
12
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 19th Oct 2011 15:29
ordinary sprite collision.

I mean there is a animation about a people. the people in different images has different position. because it's a jumping animation. I didn't control the jumping of people by program. the artists make the jumping process of a people.

I am afraid that the different position of the different images will take vision mistakes when the sprite hit the bullets.

give my best
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th Oct 2011 15:36
Have you tried using "SetSpriteShape(iSpriteIndex,3)" each time you change the image? Not sure how fast it is but it might re-calculate the sprite boundaries...?

halley
12
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 19th Oct 2011 15:45
No, I think what you said is a good advice .I'll try it.

give my best

Login to post a reply

Server time is: 2024-04-19 09:50:14
Your offset time is: 2024-04-19 09:50:14