r84 Platform collision animation issue

Bugs will be moved here once resolved.

Post » Sun Apr 22, 2012 7:44 am

Using release 84 on Windows XP and here's the deal.

I have my player on a platform with the Jump Through behavior. Also on the platform are 2 solid objects. When the player collides with one of the objects the player will twitch either up and right or down and left, going through the platform.

I have 4 animations for player: StandRight, StandLeft, SkipRight, SkipLeft. Player changes animation depending in direction of travel and whether it's moving or not.

The only ways I can make the player not twitch is either by making the platform solid (Boo!) or by not animating my player (Boo again!). Neither if these are good fixes. Any help would be appreciated. Thanks!

https://www.dropbox.com/s/ind8dkv3hwtu17r/PlatformColllisionAnimationBug.capxScottP2012-04-22 07:45:22
B
20
S
9
G
2
Posts: 15
Reputation: 2,594

Post » Sun Apr 22, 2012 1:33 pm

This is not a bug: it's common practice to use a rectangular, non-animated object for the Platform behavior, and position the animated player on top, to avoid exactly this kind of problem.

See how to make a platform game:

[quote]The Platform behavior can take care of the complexities of platform movement for us. However, there's one important tip for using it: the behavior should be applied to an invisible rectangle object, and the player positioned on top. The Platform behavior works much better if the object with the behavior doesn't animate, since changing animation frame can leave the object partly sticking in to a wall which can confuse the Platform behavior. Also, it avoids silly collision situations like your player hanging off a ledge by their nose or something they're holding.[/quote]
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Sun Apr 22, 2012 9:01 pm

Thank you Ashley!
B
20
S
9
G
2
Posts: 15
Reputation: 2,594


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests