I just need my mesh to be the collision, NOT the capsule component.

Hello, i’m having a problem that i can’t solve since months, i’ve made post everywhere, on reddit, here etc… even tried to contact developpers.

I have a simple problem, yet extremely complex for everyone. I want my character to be a cube, or a rectangle. All i want, is that my collisions are on the edges of my mesh. i want my rectangle for example to be able to move and that my right, left, top and bottom edges collide with other static mesh or environement. This is so simple, i just wanat that unreal ignore capsule collision and understand that the mesh IS the collision.

I never succeed to do it until recently, if i make a custom pawn, SOMEHOW, it’s working. But whenever i use thidcharacter bp or ANY component pre-made by unreal, it doesn’t work, capsule component override everything. I’m waiting for the angel who will save me from this nightmare because creating his own pawn is nearly impossible for me.

For example, on my custom pawn, my capsule collision doesn’t exist it has 0 per 0 size. All collisions are on my cube. Why can’t i do the same with the ThirdCharacterBp ? Ultimate mistery…

Thanks for reading me

I made one:

Just do this:

Copy third person character. Edit the blueprint and put in a cube with a cube collision like this:


That’s it.

I looked a bit more into this. Bascially you can’t use a character because the system expects it to have an upright capsule as collision. You have two options:

  1. Write your own character class in C++

  2. Write your box as a pawn ( not a character ). The problem with pawns is they have no movement, so you have to do everything from scratch…

So you are telling me that i’m stuck and i have to continue writing my own pawn and there is no way to tell the system to simply not expect a capsule collision ? I hope you are wrong haha…

My current custom pawn it nice, i managed to make it move normally, but whenever there is ramps or whenever it enter in collision with a wall or else, it’s acting like TAZ, like a tornado !

Here, feel free to take a look a it if you want :slight_smile:
(You’ll need to manually add the move component and add a simple cube in the static mesh)

though removing capsule collision by copying the CPP class and making modifications should be extremely easy all things considered.
You aren’t even removing it, you just need to change it from Spheal to a Cube or Sphere.
when you do that, some of the stuff set on it will likely break. As you compile (or try) you’ll get the errors on the lines you have to adjust.

The benefit of doing it is that all of the built in functions will still be avaliable and you can follow any tutorial you want to create movement or things you need.

Its proably a lot faster then creating a pawn with custom movement. Unless you are well versed in physics.

Hi there, i seem you have a solution for me, however you lost me right at the beginning. I don’t understand what you mean…how do you copy cpp class etc, i have NO idea where to start

If/when you open a project in visual studio you can search and browse all the classes that can be modified.
the character class should be one of those without the need to get the engine source from GitHub.

The movement component is the one that references the collision and the one you need to make sure will work with something other then the sphiel.
The character is (probably) an extension of the pawn class that has the custom links of the different classes and components along with some proprietary logic to it.

You’d probably find both under source/runtime/enginr/private/
thats usually where the good stuff is.

An exception to that is that if you created the project as c++ from a template, the template’s character will have the custom code for things like input and movement added to an extended version of the character class.
I do not think you would be able to override what is inherited without changing the inheritance to a completely different class, but, if you really cannot find the cpp files, creating the cpp project from the template and looking at the character file will give you references you can click at the top of a header file that should resolve to the class you want to copy and modify.

I can’t browse any class in visual studio
source/runtime/enginr/private/ folder doesn’t exist

I opened character movement component in visual studio via unreal engine but cannot be edited
Anyway even if it could be edited i don’t know c++
Also it can’t be copied, duplicated or else…

Basically you select the text and copy it to a custom file.
I was trying tondo this myself yesterday, and it is fairly simple up until you need to get the Movement Component to work with a square instead.
Since i went past an hour attempting to replace the proper calls I stopped. However 1) im almost positive someone has already done and published this ans 2) yea without c++ skills it is significantly harder.

howevwr IF you want the collision of the chatacter to Not be a sphel, this is the only way that works.

Okay thank you for your help, i guess i should stick to my custom pawn because i just need to figure out why he slide on surfaces

I dont know whay you are doing with that, but you probably need to read the friction parameter for the physical material you are on and apply counter force or use a fixed value.
if you are implementing the pawn movement as a physics thing.

I couldn’t explain, but i can show you.
Here you see my custom pawn. It’s kinda working except for this sliding thing and this crazy tornado he make when hitting walls.
Modifiying friction on the chair or the couch kinda work but do not prevent the pawn for sliding or doing crazy stuffs.

Small bump my problem is still here haha

Yo, I’ve been trying to figure this out too for past few hours. I’ve gotten to about the same point where they just fall through the floor or ragdoll on the floor. It’s weird because if you put the mesh (without blueprint) on your level they will have all the collisions we are trying to achieve but as soon as it’s blueprinted the collision capsule takes over. I notice post almost a year old. You find anything yet lol?

You simply cannot use the CharacterMovementComponent in association with any root collision information but a capsule. There’s a good reason for this; the collision checks that the CharacterMovementComponent performs all assume that it is radially symmetrical (i.e when it rotates, its collision data does not change), which is true of capsules/spheres but no other collision primitives. With a basic box, for instance, rotating in place can cause it to collide with geometry even though it is stationary. CharacterMovement assumes this is untrue (it has to, otherwise it creates issues with how rotation can be inherited from the PlayerController; i.e camera control). Unfortunately, if you want to create a character which uses some other collision data as a base, you have to use a Pawn (rather than a Character) and write your own movement code from scratch.

Or just copy over the CPP files for the character class and modify them extensively to do what you need.