Paper 2D character keeps teleporting whenever colliding with top part of the wall

Goodday!

I’m working on a 2d game in UE4 and whenever I bump my character into the top part (both left and right) the character gets teleported to the middle of that wall:

Anyone have any idea how to resolve this?
Thanks!

My Tilemap;

Only the walls have collision.

[Edit]
I’m using flying as movement mode to travel on the Z axis. I thought maybe that would cause the problem but I’m not sure.

I tried to create a different actor that acts like a collision wall but it still doesnt fix the issue. Im very sure it has something to do with the paper 2d character collision but I can’t seem to find out what is causing it to teleport on collision.

We would need more details to be able to solve it, but one thing that might help is to visualize the collision details using the editor. Try F8 and then where it says View Mode → Lit, try going to View Mode → Player Collision. See if that gives any insight.

image

Like this?

That doesn’t seem to look anything like the original square room, is that the same as the one in the video + picture?? Or is something unusual going on with your collisions? It should just look like 4 walls and an empty space in the middle.

Actually - I think you may have your tilemap vertical and if you are standing on that collision in the middle, you are probably walking off the ledge and falling due to gravity

Oh, no I updated the map. Forgot to mention that

Yes it is vertically. The character moves on the X and Z axis. I have flying enabled as movement mode

I’ve tried checking if the player is teleporting over 50 blocks and then teleporting the player back but that just looks weird and sometimes doesn’t even work.

In the character movement component set the max step height to 0.
credit - https://www.reddit.com/r/unrealengine/comments/zmbxk6/paper_2d_character_keeps_teleporting_whenever/?utm_source=share&utm_medium=web2x&context=3

3 Likes

Savior :pray:

Thanks for this solution! Was having the exact same issue and found this threat

1 Like