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 / "Sticky" sprites problem

Author
Message
pionner
9
Years of Service
User Offline
Joined: 14th Aug 2015
Location:
Posted: 14th Aug 2015 05:05
Hi. I'm having problem with "sticky" sprites.
When player jumps on the side of platform, and keeps arrow button (left/right) pressed, he sticks to that platform instead of falling down.
I don't have any ideas how to fix that. Could you help?



Here's my movement code: http://pastebin.com/ieh0AZ8t
Here's screenshot how it looks like (pink is player): http://i.imgur.com/bqUd00R.png
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Aug 2015 10:43
You need to detect the collision with the platform, and stop accelerating when the collison is detected.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
pionner
9
Years of Service
User Offline
Joined: 14th Aug 2015
Location:
Posted: 14th Aug 2015 12:35
Thanks a lot

Login to post a reply

Server time is: 2024-11-25 19:30:58
Your offset time is: 2024-11-25 19:30:58