Is It Possible to Create a Square Collision Box For a Capsule Component?

Hello,

I’m a beginner working on a project with a template given to me by a lecturer and I’ve run into a problem with the collision box.

Is there any way to turn it into a cube to match the player character mesh that I’m using? How can I make it so that the collision is the mesh itself? (I mean, it’s just a cube).

I did some research and it said I would have to change the capsule component into a pawn to do this? Would this be a big problem with animations, controls, etc.?

This cannot be done because the capsule component is inherited from its base c++ class, which is not editable unless you are working with the engine source. Your best bet is to create a new pawn from scratch, then you can add your own collision component. You would have to use pawn because the character class inherits the capsule component, where as pawn does not. Although I would not recommend doing that, especially for movement, as a box collision will not be smooth, it will get stuck and hung up on geometry. This is why the capsule is used. It does not look bad in your video, maybe you could do some tweaking of the size of the collision?

image
This solution fix your problem

1 Like

Thank you, very much! That helped me too!