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?
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
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.
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.
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.