Can character mesh or skeleton be used for collisions?

So far I’ve been using the default CapsuleComponent that comes with the character, however I am now dealing with a shape that doesn’t well with a cylinder or sphere. I also wish the character’s hitbox to be more precise than so.
So can I use the character’s mesh or skeleton for a hitbox? How is it done and is it compatible with animations?

For a collision box you need a volume.
An enclosed mesh is a volume.
There are two levels of collision modes in unreal: simple and complex.
In the simple mode you only have basic shapes but in the complex mode, unreal uses the entire mesh for collision by default.
You can use for the complex mode a custom mesh, which you should, because using the actual mesh has a bad performance.
You can see the different modes in the mesh editor.

Can you post a picture of the characters blueprint class in the editor?
The capsule component should be a component (=part of) the character blueprint or the mesh which you can of course replace.

Interesting, but can I remove or replace the CapsuleComponent? I’ve tried giving the mesh different properties like “block all”, but it doesn’t seem to work as it only responds to the CapsuleComponent’s boundaries.

Can you move the mesh and the arrow out of the capsule component one layer up, so that they are directly beneath the root?
Afterwards delete the capsule component.
If you can’t do that, open the mesh and edit the collision box there.

The Capsule cannot be deleted or moved, so goes for it’s content as well. The mesh has a collision yet it does not seem to ever trigger.

Mhm, I just realised, that you have several inherited components, that might be the case why you can’t delete the components.
If you create a new character blueprint, so no instance if another blueprint, that blueprint shouldn’t have ether any inherited components or any components at all (besides the character movement script)

Its a Character BP so the capsule component is inherited and cannot be deleted and if I remember right it cannot not be the root.

I made a FPS where I ran into the issue of the capsule component consuming all the hits and preventing my mesh from getting hits.

My solution was to resize the capsule component to be inside the mesh as setting the capsule component to any other hit detection would cause crazy issues for me.

I later learned that I could make custom collision channels to allow the capsule component to still collide with everything except bullets.

These are some things to think about that might help.

If you need elaboration let me know.

As an aside you could just make it an actor instead of character giving you more control of the hierarchy but you’ll have to add and setup the components that make it work like a character which can be complex.

If your mesh has collision on it then it should not. Assuming the collision is setup on the mesh. Otherwise you could add collision to the wing set it to world static only giving you collision you need without the character capsule component and avoiding any hits with projectiles etc… provided you have custom channels for that.

You said it better then me :slight_smile:

Resizing was one of my thoughts as well; the only problem is that it allows the wings to clip through the environment rather than coming to a stop.

yeah, that’s one thing about Characters… getting the collision capsule to fit non-humanoid or round mesh shapes is a real issue and I"m having the same issue with my current Character .

In general though, it can be really useful to leverage the advantages of the Character Actor, I’d say do what you are doing… use the capsule for movement collision… and use the custom collision for hit detection. If you don’t need all the features of the Character Actor… you might consider using Pawn Actor

The Unreal wiki say about the Character class:

A Character is designed for a vertically-oriented player representation that can walk, run, jump, fly, and swim through the world. This class also contains implementations of basic networking and input models. […]
The CapsuleComponent is used for movement collision. In order to calculate complicated geometries for the CharacterMovementComponent, there is an assumption that the collision component in the Character class is a vertically-oriented capsule.

Unreal Wiki: Character class

In short: The character class is not realy suitable for a plane, because you have completly different movement controls.
You should use an actor instead, that way you don’t have the unwanted collision capsule and you can create your own collision volume.

… Takao is correct about the capsule component… however, as you may have come across… if you set your Character Component movement mode to Flying --with Set Movement Mode-- it can be very handy for spaceships for a few reasons (especially easy to implement, low cost physics, multiplayer networking built in)

BTW if you abandon the Character actor class and switch to Pawn class, there is also a Flying Pawn Movement component you can add which may be useful

thanks Exxon, but you added a bunch of extra useful stuff :wink:

, What about attacking a character and applying damage when colide character with mesh? Pretty much first person, action, vertically oriented