In my fight game, I want to create a big monster enemy, player can walk and attack under it, like following:
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:
I consider two solutions:
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).
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:
the part of skeleton mesh outside of capsule component has no block collision with the wall.
Therefore, I have three questions:
Are there any other better solutions?
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?
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
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.
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.
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.