2d top down - collision box instead of capsule?

I am trying to create a top down 2D game to learn some basic stuff in UE4.

The issue i ran into is the following:

The PaperCharacter blueprint relies on the capsule component as root collision object.

I need a different behaviour, i need a rectangle collision object. I found no way to achieve that, even adding a collision box as a sub component and setting that one’s behaviour to block all while disabling the collision for the capsule doesnt work.

To explain what i want to achieve:

Imagine a grid on which the player can move his sprite. There is a plane beneath the grid that acts as a kill-collision object. The sprite is being moved over various tiles (moving/not-moving), these have “step-on” enabled. So far so good.

I have moving collision objects on that grid - so if the player collides with them he gets killed. The issue is that the collision check between player sprite and moving object is based on the capsule - while it should be based on the collision box that i have.

Hope that made it clear, main question i have is - can i have a root collision object in a sprite character that is NOT a capsule ?

ty & mbr

Swiss_Sarge

Hey Sarge, I was having the same problem, to fix it I left the capsule with it’s default shape values and I created a box wich its not attached to anything, If it still does not work try raising the “y” values of the box.

Hi Neil,

thx a lot for the feedback. I sorted it by adding a collision box in the hierarchy, AND adding collision events for that box.

This fully solved my issue

cheers

Sarge.

I really need your help on this Neil. I am on version 4.4.2 and after following your directions, only collision of the capsule is recognized. Could you make a few screenshots to show me please? I would greatly appreciate it.

Do your component hierarchy look like this image?, I did this and the “Your Box” overlap is recognized by other blueprints.

Currently there is no way to replace the capsule component. The way the system handles floor checks inside paper 2d is actually to create a box(!) to prevent sliding off ledges. See my post at the paper2d forum. Collision implementation in paper2d is a little rough at the moment but I hope they will fix it soon as 2d games demand different things than 3D ones.

I may have misread your suggestion initially and the OP’s question. I know how to add collision as your image shows, but I was looking to disable the capsule collision and enable a box collision for character movement.

If I set the capsule to no collision and the box (as your image shows) and set it to block all, the character will fall through objects. Adding a shape seems to work perfectly fine for overlap events, but not collision for movement.

2 Likes

I have same problem. Capsule colision strange behave sometimes then jumping try move then sometimes it floating in air with boxes near player capsule and I want that it fall from corner not sliding like, but stryght and more realistik. Is reason why I need box collision and not capsule in player.
But it seems only in C++ I can this change. In blueprint you can use only capsule collision, but i using only blueprints.
Ideal is not box, but Cylinder…