How to get Collision channels working on Character BP-SK that has Physics asset set in Anim BP?

Can you please help educate me.
[Edit clarification for anyone else: I’m using UE4.27 and UE4 Mann Skel - not ALS; and in Character BP, im using Set Master Pose Component node - for modular Mesh setup.]

  1. I had a Character BP with the Collision channels of > Capsule and Skeletal mesh, setup and working correctly for > AI hit detection, and Ragdoll body fall on ground when Player dies.

  2. Then in the same Character BP, I changed the SK Player mesh to a new version, which is a modular mesh setup (Layers of meshes/armor that move with the same animation sync).

  3. And now Collision channels do not work in the Character BP > SK mesh (after I did step 4).

  4. Because for Modular to work, I turned off the Physics asset of each SK Mesh part. (I imported the Main Character mesh with a physics asset, but imported the Additional Mesh parts without setting the Physics asset - otherwise it messes up the Modular animation sync.)

  5. So then in Anim BP, thats where I set my Physics asset (which is used by all the modular mesh parts).


  1. So Modular-Anim-setup and Physics effects work (on the SK mesh), but when I use this new method to assign the Physics in the Anim BP > the Collision channels in the Character BP > Skel Mesh - seem to get ignored??

  2. So how do I setup Collision channels on the SK mesh to work, when the Physics asset is assigned in the Anim BP?

  3. I read something about Physics Material. But I didnt see settings related to which Collision channels to use, like Visibility, Trigger, Pawn, etc (that are shown in a Character BP > Skel mesh > Collision.

  4. Can someone can tell me the settings to change for #9 solution, or post a link to a short video or guide. Thank you.

You can change the collision profiles and reactions at run-time with blueprints

You also need to reset the character settings to the previous ones and turn off simulation

1 Like

Thanks for the pics!
For pic 1, is that in a Character BP or Anim BP? I dont have access to drag in a Skeletal Mesh ref (correction *“Static Mesh”) in a Character BP, only a “Mesh” ref??
And I dont understand, if those nodes work to set Collision channels, then why are the settings in Character BP > Mesh component > Collision channels … ignored?

(If pic 1 is of an Anim BP, then I understand and this may be the solution I needed > nodes to add in Anim BP > to set Channels instead of in Character BP.)

For pic 2, I’ll try that. Why do I need to turn off Physics simulation on the Mesh (which is the Character SK in the Character BP)?

(Maybe my v1 Physics setup was wrong for v2 (modular physics). So if that’s the reason, kindly say :slight_smile:
My v1 Character BP was kinda complicated. I had to have some Capsule channels off, or they made the physics in Character Mesh glitch. But when using V2 method (modular meshes), maybe I dont need to change whatever I did in V1, and what you showed is how to correct that?)

I’m guessing because you are still simulating physics on Character BP → Skel Mesh. So it ignores collision and uses the Physics Asset to drive it motion.

If you have a ref in the animBP then you can just drag out your character and get Skel Mesh from it and apply the needed changes and disable physics sim.

Are you using Set Master Pose Component for the layers?

If so then I have some bad news for you. It only takes in the collision of the base component. Other attached driven meshes have their collisions disabled/

1 Like

I looked, I dont? (I dont see any components panel in Anim BP.) So I cant put those nodes in Anim BP.

Yes. And it’s fine if only my Base Mesh component (main body) detects collision.
I have the other meshes as Children of the Main Body mesh. And their area doesnt change the total shape a lot, so I dont need collision on the Children meshes.

Heres what I have access to in Character BP. “Mesh” is the main body mesh (which is a child of Capsule). And Boots mesh is a child of Mesh (main body). So can you clarify your pic which nodes I should do for Mesh? Ty

Ty, heres what I have. The Capsule has simulation off. And the Mesh has it checked on? But grayed out. Idk what this means or if this is vanilla. So what should I do?

And is it possible to have Physics asset On, to drive motion (in Anim BP), yet still have the “physics” in the Character BP > Mesh with certain Channels On, to react to getting hit, and collide with line trace hit detection (from AI code)? Thats what I want, 2 purposes. Ty.

Advanced locomotion system does this in it’s phases

To Ragdoll

GetCharacterMovement()->SetMovementMode(MOVE_None);
//  Disable capsule collision and enable mesh physics simulation starting from the pelvis.
GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision);
GetMesh()->SetCollisionObjectType(ECC_PhysicsBody);
GetMesh()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
GetMesh()->SetAllBodiesBelowSimulatePhysics(FName(TEXT("Pelvis")), true, true);

From Ragdoll to normal

GetCharacterMovement()->SetMovementMode(MOVE_Walking);

// Step 3: Re-Enable capsule collision, and disable physics simulation on the mesh.
GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);

GetMesh() in you case is just "Mesh" drag off it's pin and try to replicate these commands (start typing after the pin drag untill you get the command)

GetMesh()->SetCollisionObjectType(ECC_Pawn);
GetMesh()->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
GetMesh()->SetAllBodiesSimulatePhysics(false);

All of these commands are doable in blueprints like I showed you earlier.

1 Like

Thank you. I should have added that I am using the Default UE4 mann Skel, not Advanced locomotion (ALS). (Or is the way my Physics is set in the Anim BP - comparable to how ALS is?)

So will the BP nodes you showed me still work for Non-ALS skel?
(I’ll try in the meantime, but correct me if I’m wrong or if you know an alternative for UE4 Mann Skel :slight_smile: Ty.)

Thanks for your replies. I hook it to Begin Play right? I tried the instructions above, and Collision on the Mesh did not work:
My Character Mesh doesnt push AI Character (which worked in my v1 BP), and his trace channel cannot detect my Mesh to hit it (no collision working). And I get an error:

Invalid Simulate Options: Body (SideScrollerCharacter … .CharacterMesh…) is set to simulate physics but Collision Enabled is incompatible

Please check if my Check boxes are wrong:

This also failed:

Ok so
Collision Channels
are a thing.
You are supposed to create a custom channel with custom responses so that the “other stuff” is left alone.

So the problem is at your original #4.
You imported something without a Phat asset. This would prevent any functionality.

The correct setup for modularity is a master mesh with phat.
Then parented sub-meshes without phat assets as they rely on the master-pose to function.
character
Barely visible, the tris is near spine 01

Normally, the master mesh doesn’t really have a mesh. A single tris near the mid-pelvis, or mid chest, is enough to have the skeleton be there and provide the support for whatever other components you stick on top of it.

for collision channels and - I think - what you want to have happen in the end, check this

1 Like

Thanks for your reply. So what do I need to do to correct? I am confused because:

  1. “The correct setup for modularity is a master mesh with phat.” < I did that. See pic.
    Meshes imported
  2. And in the SK of the Master mesh - I set the Physics asset to none – is this correct? (or else when I play, my body immediately collapses like a ragdoll) - because I set the Physics asset in the Anim BP (for all the mesh parts to use).

2b. (And in Character BP, my Physics settings were like this by default during my V1 setup. Correct or need to change for V2 setup?)

  1. Likewise, all Children mesh parts also have Physics asset set to none in their SK. Correct?

3b. (In the Free for the month asset of the Zombies - I see he imported modular parts with their own physics assets. So he has like ~4 different Physics assets for the character. His import method is incorrect for my method of: Modular meshes + Set Master pose (sync) + I want Physics of the Body mesh to wiggle/react to getting hit in game (External Forces) + shared Physics asset is set in Anim BP instead – correct?)

  1. “Then parented sub-meshes without phat assets as they rely on the master-pose to function.” < I did this.

4b. And this is my Master Pose code – correct? (+ the other Construction code)

  1. But are you saying that my Master mesh should not have body geometry at all - because it turns invisible (collision-wise – I am still seeing it in game) - when using the Set Master Pose method? Thus I as Master, I need to set an FBX with 1 tri - to register the Skel. Then as a Child mesh > I put my actual body mesh?

  2. Then where do I put my Boots, Armor mesh: as Children of the Child Body (since they are supposed to go on top of the Body verts?) - or put Boots as Children of the Master-1-tri-mesh (since Boots and Child Body will use the same Anim BP - and thus align correctly?)

  3. “You are supposed to create a custom channel with custom responses so that the “other stuff” is left alone.” Thanks for the vid :slight_smile: . Are you showing me HOW to create custom channels? Or showing me that I need to do that actor replace tech - that he showed?

  4. Because I did setup custom channels for the AI hit/trace (which worked in my v1 Character before I changed to modular setup). But my problem is in my V2 setup (modular meshes + Set Master Pose + Phat set in Anim BP) - that every channel of the Character Mesh is getting ignored (no collision) - thus AI cant perform his line-trace attack.

  5. And when I did the BP code as @3dRaven said, I get an Editor error “Invalid Simulate Options: Body (SideScrollerCharacter … .CharacterMesh…) is set to simulate physics but Collision Enabled is incompatible

  6. So is step #5 the solution? And which collision channels do I need to set for a Master mesh? And must I still do the Event Begin Play code? Or what is the solution? Thank you.

That’s incorrect. If you remove the phat then physics won’t know what to do.

The reason it collapses like a ragdoll is:

You want both off, and you toggle the mesh to simulate when you want to activate ragdoll - programmatically.

It’s not a must, it’s just convenient if you want full modularity.

that.

That’s because you altered the character’s main setting. The capsule has to be set to what it is originally set to - or similar in order to provide interaction with other characters/environment, etc.

You aren’t going to necessarily find 1 solution.
What you are doing entirely depends on how you want to do it - on top of you understanding how the engine wants to work to work around it.

The collision between the skeletal mesh and the capsule component CANNOT cause hits. Otherwise things spaz out since the capsule contains the mesh.

The simulation on everything has to be off by default.

The skeletal mesh can have it’s Hit response changed, but that will just drive what can cause a hit ON the skeletal mesh - not necessarily what the skeletal mesh Can hit.

Rigid body works off a pre-defined chain.
Try an animdynamics:

Also, if you noted at the end of my character parts, in the components, aside from DynoFoliage there’s a PhysicalAnimation component.

That’s a shortcut to do some cool stuff instead of limp ragdoll, by setting a rigidity profile.
It also provides some interaction with the world.
Except keep in mind that even with low rigidity you are almost never going to stop the force of an animation (so an arm swing will knock simulated objects around at near the speed of light - One of many engine short-comings).

1 Like

Thanks for the replies. I’ll go thru what you said. But in the meantime, clarification please:

Well whatever I did, the physics ARE moving correctly on the Character mesh (in sync), to wiggle in game based on anim BP > External Forces. But I believe you mean my Phat setup is incorrect for the Character BP side of Phys > since im having the no collision issue?

So ill toggle off those settings in Char BP that you said.

  1. But moving forward, when I 1st time import a new character (the Master mesh and its Skel to use), I Create Phat, correct? (which I have done).
  2. And then I set the Phat in the SK asset, correct? (which you said I need to fix).
  3. But when I 2nd time import only modular mesh parts (the base skel is already loaded) > Do I need to create a Phat for each modular part? — Or no, because unneeded, because I want my Anim BP to set the Phat for the Master and Children meshes to use the exact same Physics constraints - so they wiggle/move in sync?

(I dont want 10 extra Phat assets if I dont need them. And I dont need extra or different collision on the Modular parts - only on the Master Body part > and Children use the same.)

  1. If I chose NO at #3, then after import of modular parts, do I need to open the SK for each part and set the Phat to the Master Phat? (Or during #3 import, I can set the Master Phat to be used for that modular part.) – Or is this step unneeded because Anim BP will take over and sync the Children to use the same Phat? Thank you

This doesnt work.
In my post above, Step 2 > I opened the Master mesh SK > set its Phat.
Then in Character BP > I had to add a node: Set All Bodies Simulate Physics - New Simulate = false (this means turn physics off right?) Because the Character BP wont let me click on Character Mesh, then manually uncheck this grayed checkmark …

So as soon as I did those 2 steps (Set Phat in SK mesh, and turn off Simulate Physics in Char BP) > and Play > my indivisible character capsule (or invisible Movement component) walks (moves my screen/camera) and separates from the visible character MESH (which is animating the run), but is stuck in place (not moving with Capsule/Movement).

Depends on the part. Some need it. some do not.
Either way so long as the skeletal mesh isn’t set to simulate physics, even colliding with other mesh parts would not affected it. It depends.

No, you just leave em blank.

Should be grayed out, but also toggled to false.
You shouldn’t be able to directly toggle the switch from any skeletal mesh components you add - consider migrating to a new character blueprint. (easier than figuring out why it’s toggled).

Sounds like your parenting is off.
Have you attached the mesh correctly, and removed their local transforms?

Sounds like master pose component is running, or you wouldn’t get animations at all (t-pose). I run mine on construction, so the blueprint can be used to preview full animations anywhere. Same difference if you have it elsewhere. so long as you do have it.

There really isn’t much else to it:

Main mesh with assigned Phat asset.
Parented parts with no phat asset.
Capsule component set to Pawn (optional toggle Generate overlap events on).
Main mesh (and sub parts) set to CharacterMesh (optional toggle Generate overlap events on).
Master Pose component on begin play or on construction. So long as it’s somewhere.

1 Like

Yessssss. I’m so happy I got it fixed. Thanks for this confirmation (after I posted my pic showing my settings).

So the solution [to get Mesh Channel hit-detection working when the Mesh also uses a Physics setup in Anim BP] - was 2 things:

  1. In the Master (main body) SK mesh (that I use in the Character BP) > I need to assign a Phat.
    (I had it off based on a paid modular asset that showed me how to assign the Phat in Anim BP > to create movement Physics. And we had the SK mesh with no Phat assigned, or else the Physics body collapsed on Play.)

  2. And to fix the above, in Character BP > Character Mesh (the SK) > I have to make sure Simulate Physics is false.
    (My BP had a bug or error, the setting was grayed out so I could not disable it.)

I fixed this by putting a Node in the Construction Script > ‘Set Simulate Physics’ = False, Input Pin connected to my Player “Mesh.”

Need to uncheck this gray >


By doing this >

Then I had to compile to activate the Node > then manually select the Mesh (Left panel) > go to settings (Right panel) > and now Simulate Physics was ungrayed > and I still had to check it to False.
(So putting the Node in Construct > enabled me to ungray the setting. But putting the Node in Begin play did not work.)

Thanks to @3dRaven for showing me examples of Physics Nodes - to give me the idea to put ‘Set Simulate Physics’ in my code to force it to ungray.
And thanks to @MostHost_LA for providing clarifications for my bug/glitched BP.


Feature 3: Nudge Enemies

I also setup my Character BP collision, so that my Player body can push/nudge AI characters out of the way - instead of AI body blocks me by default.

I used these settings to get it to work:

But the final problem if anyone can please fix:
When the Player Mesh overlaps the AI body mesh - my vertexs (that are Physics enabled) jitter very fast/unnatural, or crush/deform weird.

How and where do I fix this? Is this a Character Movement component - “Depenetration” related setting?
(Depenetration is when UE tries to make 2 meshes stop penetrating each other - and the code/settings for that seems to be in the Movement Component of the Char BP.)

Or is this a Physics Asset > Constraint or Body setting? (I have mine tuned down so Physics are mild. So I dont understand what is causing the extreme mesh deform.)

Note: for Feature 4, I do want the AI hand-swing animation to affect my Physics Bodies - thus I do want some overlap for Feature 3, just not extreme Depenetration. Like the Enemy hand swiping at my hair, or belt packs. I want my Physics Bodies to 70% retain their shape or just wiggle on their bone set in the Phat.

Does anyone have a chart showing what every Phat > Constraint setting does, and translated to values that represent Kilograms or Pound units - for mild reactions (instead of the default extreme Physics reaction)? (E.g. in UE = a Constraint “_” value of #, represents 150 lbs.) I need to know what is making the Physics extreme. Ty

You are kinda barking up a very wrong tree.

First of all, with Chaos and an over 75% performance drop, one has to seriously question the viability of even using physics to do anything at all. (possibly also extend this to general character movement? after-all this means 75% less moving characters in the end scene are possible…)

Second of all, you have a skeletal mesh interacting with another skeletal mesh.
IF both blueprints for it include a physical animation component, and a proper interaction is set up - meaning the rigidity settings/profiles allow for it - then you Will get jittering almost all the time.

Take the example of a walking arm swing in a fixed line (left to right) into the mirrored opposite (same animation); On impact:

You are actively telling both arms that they should be in X position, but the physics are saying “you can’t be here move back”.
This generates 2 things:
1: incredible forces applied to the object because animations apply an un-managed amount of force.
2: Stuttering, if your physics options in project settings aren’t set correctly. / also some settings on physical animation that would have to be fine-tuned for this specific case. And possibly always, since both animations are competing for Which One gets to reach the “final” pose…

I would suggest you “forget” about interacting this way, and make the skeletal mesh interact with the character capsule - OR - which is where predictive animation comes in, you detect the movement and adjust the opposing animation accordingly in some other way, maybe triggering a manual hit reaction…

Either way the interaction has to be One Way - from controlled character into the object you bash into. Not both ways, or you get, shall we say “competing” issues that are left to physics to improperly solve…

1 Like

Thanks for that reply and things to consider. But I have seen what I want already in a youtube vid from like 2020. I’ll try to find it.

A physics character walks slightly past another physics character from behind, and her arm actually moves (from physics) and rests on the back (mesh boundary) of character 2. E.g. almost like a ragdoll hug.

And Ive seen this in Street Fighter 5, which used UE4.

(If you slowmo some attacks, you can see Player 2’s leg hit-react: during a block anim - his raised leg slightly moves backwards when he blocks Player 1’s attack.
And this is the realism we expect in UE4/5 (a Physics Game Engine) - preservation of momentum/force. So Player 2 may animate to raise his leg to block, but when Player 1 hits - some of the force gets transferred to Player 2’s leg and moves back slightly.
Thus the SF5 devs know which setting in UE controls the Mesh not deforming extremely during Physics collisions, which is what I want to know - where is that setting?)


As for this, I’ve seen code for the Anim BP that allows Physics to be affected during Animation movement (not just between Anims as I have setup now).

So the Physics is throttled (tamed) but driven by a bone moving (from the Animation), yet the physics Body can still slightly react (to other forces) during that bone-driven Animation. The code Blends/even outs the movement. And this is the realism in UE4 and 5 that we should see more of.
(I’ll post my updates after I implemented this.)


But for my question of Feature #3, does anyone know the answer? (I know what I ask is possible in UE4, I just dont know where/which settings for it, in Character Movement Comp - Depenetration issue? Or a Phat issue - Constraint or soft body setting?:

Thank you :slight_smile: