Why do I sometimes fall through a raising platform when I jump on it?

Setup: I made a static mesh platform. That when you step into trigger box, platform rises up 1600 units over 1 second using a timeline. When I get on platform it rises up with me on top normally.

Problem: When I try to jump while on platform I sometimes fall through it.

Reproduce: I can generally make myself fall through platform right when platform starts to lift player by pressing spacebar a quick couple of times.

I have Use CCD checked for my character, mesh and capsule component. I have BlockAll for character and platform.

I have placed platform in a smallish pit, so that way I can always be completely on top of it, because I was thinking that capsule was going slightly through platform to cause problem. It was worse when platform was at ground level or higher.

How do I fix platform / player so I don’t fall through when jumping?

Thanks in advance for help!

1 Like

Hi there! I think I have had a similar problem, so may be able to help.

First I’d look at your world scale. physics system uses world scale (1 unit = 1 cm) you are moving your character 16 meters in one second. It possible that scale of your scene objects is having an impact.

If you jump (or step off a ledge), IsFalling is set to true on character, it will then trace for collision, so it’s likely because of speed platform is moving that it is returning that character as isFalling when you jump, as it hasn’t been fast enough to detect a collision hit from bottom of character collider to moving platform allowing it to pass through you.

Another option worth a try is increasing accuracy of physics simulation

Project settings > Physics > Frame Rate > Enable substepping

Then adjust max if you need more accuracy. Performance will be impacted so I’d have a play around, it also says its experimental.

Hope that helps!

1 Like

Hey Orangemicro,

I spoke with developers about this issue, and it sounds like they’ve been working on improving platform movement in relation to characters using CharacterMovement component. There have already been some improvements which should make it into 4.3, but a more robust system should be coming soon as well.

solution CatDixon mentions above should help with situation if you continue to use Matinee to move your platforms.

In meantime, you can also consider using a different method to move your platform. Instead of using a Matinee, you can use a Timeline curve to set position of platform. This may introduce other issues if you’re moving platform in any other way than up and down, but shouldn’t have issue of falling while jumping. Again, this system is being improved upon as well.

Hope that helps!

Thanks you guys! That helps 100%, much appreciated.

Adjusting Physics substepping settings won’t make a difference here, unless platform is simulating physics.

This problem is caused by platform object moving into character without checking for any collision. Using either a timeline or matinee to move platform simply changes platform’s position without any regard as to what may be overlapped at destination. At that point burden is on character to try to resolve overlap, which it can do in some cases, but which is more difficult if it is penetrated by a large amount.

One thing that may help is to set “AlwaysCheckFloor” to true on CharacterMovementComponent. This is just a guess because I can’t reproduce issue exactly (it is sometimes very frame-rate dependent as well), but it may help with case of platform starting below player when player is standing still.

1 Like

When using Vinterp to move an Actor component (static mesh Floor) I get similar behavior (player character falling through floor when jumping when object is rising). It doesn’t happen all time, but when spamming jump button it’ll happen after about 3 times, it seems like character is colliding at first but then falls through. I’m using 4.12.5, Mesh collision is set on BlockAll and I’m using standard FirstPerson Char BP.

Same thing when going down when there would be a ‘roof’ above you, if you jump while platform is moving down you’ll find yourself standing on roof. Collision behavior is normal when jumping when Floor is not moving.