Platformer - Vibrating Player?

Post » Mon Oct 02, 2017 7:04 pm

Hello,

Relatively new to C3. I am building a platformer. I have the player (titled Red) that has the normal platform behavior. I have Wall objects that have the solid behavior.

Sometimes when Red jumps and lands on a Wall, Red vibrates/bounces up-and-down for a few seconds. How can I fix this?

I have checked the collision boxes, point of origins, everything.

Thanks!
B
9
S
2
Posts: 28
Reputation: 811

Post » Mon Oct 02, 2017 10:01 pm

@satellite23 If you have separate animations assigned for jump, fall, land, idle etc I would check that the frames for each animation are the same size, that the origin is in the same place on each and the collision boxes match. Otherwise what can happen is that on landing the animation changes, the new animation is overlapping the solid object and so has to pop itself out.

An alternative to having the platform behaviour assigned to the animated sprite is to assign the platform behaviour to an invisible sprite object that remains a constant size and then pin the animated sprite (without platform behaviour) to the invisible object. You do all the platform and collision checks on the invisible object.

If that isn't causing the issue then we have a mystery on our hands and it would be worth sharing the cp3 file :)
B
24
S
9
G
4
Posts: 515
Reputation: 4,472

Post » Tue Oct 03, 2017 4:13 pm

Alright, I fixed it.

For some reason, the origin points on the Wall object (which has different animation frames) were slightly off...by decimal points. Duh. I should've seen that right away.

Thanks.
B
9
S
2
Posts: 28
Reputation: 811


Return to General Discussion

Who is online

Users browsing this forum: Unconnected and 6 guests