How do i make skeletal mesh based collisions for characters or pawns?

I’m working on a game that will need quite elaborate collisions for some characters, maybe even per-poly collisions, at least under some conditions, but generally speaking something like the the rigidbodies you can set up with a physics asset should work fine in most cases.

However I have 3 problems.

  1. Every method I’ve tried to use either per-poly collision or physics asset rigidbodies for collision has failed, (basically enabling those options for the skeletal mesh in the character blueprint and messing with the collision settings). What I tested was making the character T-Pose and moved it around. When the arms hit objects no collision events were detected and the arms just passed through the objects. So right at the start I’m already struggling just to get a basic proof of concept working. I know it’s possible, but I just haven’t figured out the right combination of settings yet, or maybe missed some important step.
  2. If I use a character blueprint the capsule collider becomes an obstacle, because it cannot ever fully conform to the model (there’s just no way to do that as far as I know) it means there will be collisions when there shouldn’t be (such as objects or other characters moving between another character’s legs). I know exactly one way around this, but it’s ugly and only works if the second actor is not also using a character blueprint (Adding a custom collision type from the project settings and using that to dictate which objects do and don’t interact with the capsule collider, but if 2 actors have a capsule collider then naturally they would collide in that scenario)
  3. If I just use a pawn class I get rid of the capsule collider problem but I haven’t found a way to even enable physics, much less proper collisions with a pawn class yet, so spawning a floating character that rotates with the camera is as far as I got going down that route…

I need a solution to the first problem and either the 2nd or 3rd, i’d be satisfied with using a pawn class since I can probably live without the charactermovement component, there are so many different ways to move a character that i’m not overly worried about that one, but there’s a lot of handy utility in character blueprints that it wouldn’t hurt to have for controllable characters.

So, how am I actually supposed to do this?

  1. As I understood from some test before–you must enable Simulate physics for Hit events on Mesh. + possible traces must be added.
  2. You can set Overlap or Ignore Pawn capsules.
  3. Didnt use non-Char class for Pawns yet. So can’t give an advise.
1 Like

I’ve been working on something similar so I am very interested in this.

Here is a test I have set up for per poly collision. (Red box is skel mesh with per poly on, Blue boxes are static mesh with physics enabled)

You can see it sorta works, Objects can rest on top of it (it is slowly sinking in) but it wont interact with objects when it animates into them

perpolyCollision_issue

In my case I am after some very large creatures I want to interact with so simple shapes isn’t going to cut it

The problem with the blue boxes clipping through seems kinda similar to the physics update issue described at the start of this video

His solution is character blueprint specific, and it frankly sucks, but i think maybe one of the collision settings like CCD should probably be able to fix it.

1 Like

I’ll take a look and report back tomorrow! Thanks

5 minutes later update: Took a quick look and the video seems to be something concerning only the character movement component which brings itself to rest whenever its not moving. my actors are pawns or static mesh with sim on.

Did a little test though, white box is a rotating static mesh. It easily holds up the box on top and pushes the other, unlike the skel mesh in red
PerPoly2

Just some notes.

The key to ever thing is the ability to generate an event, as demonstrated in the video example.

Soft body differ from hard body objects as they don’t have the same collision properties. Soft body is usually bound to a rig and how the vertices are driven to deform the mesh.

Per poly collision generates a huge performance loss.

Best practice is not to apply complexity to a working assets but rather apply solutions as a means of controlling the object.

I would suggest looking and attaching a control rig and taking advantage of the full body IK solution. It has the features necessary to solve the full body collision requirements along with secondary behaviour with out having to know the nuts and bolts work.

Lots of examples on Youtube to watch over coffee and donuts

VRIF - Full Body IK Test with 2-Handed Weapons (youtube.com)

Thanks for the info and perspective. The per poly collision can generate events accurately so i suppose I can just push overlapping actors back up away from the impact point as if it was collision.

not sure about OP @Cestarian, but I am really hoping to get per poly to work because of the scale of creature I am working on. I am after something in the realm of shadow of the colossus so there are a ton of areas where there needs to be some flexibility in the collision. To keep the expense down I will be using static shapes where ever I can, but also need some comparable soft area solution.

one thing I was considering was something along the lines of the spline mesh system. Have a bunch of simple shapes that move across the surface of mesh clumping up and spreading out depending on the stretch of a face. But not sure there is an easy way to do that, Niagara has some vertex tracking stuff, but otherwise probably need some code work.

That is basically what I need, how do I do it though?