How to set collision of big monster with skeleton mesh

In my fight game, I want to create a big monster enemy, player can walk and attack under it, like following:

137968-bigmonster.png

However, Character class uses capsule component as root and charge collision, CharacterMovementComponent is also based on capsule component. With capsule component, the player cannot reach under the monster mesh, like following:

137970-bigmonster2.png

I consider two solutions:

  1. First Solution: create a pawn class and use the skeletal mesh as root component for collision, and then create my own movement component to use the skeleton mesh for collision(maybe cost some time).

  2. Second Solution: As the link said: [Request]Collision shapes for CapsuleComponent in ACharacter - Programming & Scripting - Epic Developer Community Forums
    I can continue to use default character class, just put the capsule component at the bottom of skeletal mesh to only collide with terrain, and enable physics asset of the skeleton for collision. If I don’t misunderstand, this second solution is like following:

137981-bigmonster3.png

The problem with this second solution is: If I set “Simulate Physics” to true, the motion of the monster mesh is very strange, just like the skeleton mesh is dancing above the terrain?. And if I set “Simulate Physics” to false, the result is like folloing:

137982-bigmonster4.png

the part of skeleton mesh outside of capsule component has no block collision with the wall.

Therefore, I have three questions:

  1. Are there any other better solutions?
  2. What’s the problem with me when I try the second solution, what’s the correct way to use physics asset as collision in condition that skeleton mesh isn’t root component?
  3. If there isn’t any other solution, which solution in two as I mentions before is the correct one?

I have spending three days on this problem, wish someone could provide some help, thx :slight_smile:

Hi.
Im facing the same problem and trying to set a collision on each foot.
However, I dont know how to detect the collision that the plier character attacked.

I found the solution.
First of all, I also set collisions on each foot.
Next, regarding the judgment processing when the player attacks, I implemented it as follows.
BP_Enemy_Wyvern is the pawn blueprint class of big monster. Please change to what you need.

Hi,

You can set the capsule component as shown in the pics below to prevent collision.
Make sure Pawn is set to ignore in the options in picture 1.
Then add new capsules and make it a child of the Mesh. It must be nested under the Character Mesh.
Go to the details panel and set the collisions shown in picture 2.
Select the parent socket shown in picture 2. Click the magnifying icon.
The socket is the skeletal mesh’s bone name.
If you don’t know the bone name, go to Persona shown in picture 3.
The bone name will only show up when it is a child of the mesh as in picture 4.
Then adjust the capsules transforms and capsule half height and radius in the details panel in picture 5.

Hope it helps.

337271-ue-collision4.jpg

Hello, I have tried this method through you.

Question:

If I put the capsule under the bone model, the capsule can’t collide with the wall (I don’t know why), only if I put it under the root, which causes another problem, if I put the capsule under the root, I can’t get the slot of the capsule to follow the bone.

This is my situation:

Well, I tried it this way:

  1. I will create several colliders under root (so that they can collide with the wall)

  2. Then I obtained the skeleton position and rotation in the grid in tick, and set several corresponding colliders.

  3. The results are quite satisfactory, but I don’t know if it will affect the performance cost of the computer much. (I think it is very influential)

Why update on tick? Can’t you just attach it to the bone once it’s in place?

You are right :wink: ,but that time ,I didn’t think about it that much,thanks