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.

Newcomers AppGameKit Corner / Sprite glitch while animated

Author
Message
Janku Ayanami
9
Years of Service
User Offline
Joined: 31st Aug 2015
Location: Namibia
Posted: 15th Sep 2015 16:54
I am building a platformer and I am trying to get some mechanics going. The problem is that while a sprite is animated I cannot use setSpritePhysicsVelocity().

If the sprite is not animated the setSpritePhysicsVelocity() works fine, however, while its animated the sprite only seems to "jump" about half way to when its not animated.

Here is my code:
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 16th Sep 2015 01:52
Here is how I have my platformer movement setup / animation on my character. Note: It is only the walking animation.









Beta Test Age of Knights:https://play.google.com/apps/testing/com.CrazyProgrammerProductions.my_AgeOfKnights
Download JellyFish Dive:https://play.google.com/store/apps/details?id=com.CrazyProgrammerProductions.my_JellyFishSwim
Janku Ayanami
9
Years of Service
User Offline
Joined: 31st Aug 2015
Location: Namibia
Posted: 16th Sep 2015 17:05
Your code gave me a bit of a different idea to use a few other work arounds for the project.

I just updated the second function and though a little silly, it's closer to my goal than I started out with.

Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 16th Sep 2015 18:36
Glad I could help, Although its not neat and the best looking snippet.
It gets the job done for me at the moment and I have not yet gone back to revise it. (If I ever will )

Beta Test Age of Knights:https://play.google.com/apps/testing/com.CrazyProgrammerProductions.my_AgeOfKnights
Download JellyFish Dive:https://play.google.com/store/apps/details?id=com.CrazyProgrammerProductions.my_JellyFishSwim
Janku Ayanami
9
Years of Service
User Offline
Joined: 31st Aug 2015
Location: Namibia
Posted: 17th Sep 2015 07:52
Same here, I guess it can be done better, but for the moment it fufils my needs.

Login to post a reply

Server time is: 2024-11-23 10:43:09
Your offset time is: 2024-11-23 10:43:09