I am having a hard time understanding collision. Does Component Hierarchy play into collision settings? The Skeletal Mesh Collision settings seem to make no difference, but the parent Capsule Component does when it comes to falling through the floor.
Falls Through Map
Capsule Component = No Collision
Skeletal Mesh = Block All
Does NOT Fall Through Map
Capsule Component = Block All
Skeletal Mesh = No Collision
I would think even if the capsule component has no collision, that the skeletal mesh would still “block” the floor or any other appropriate objects.
Secondly, when two characters with skeletal mesh’s set to block all get close, they seem to still “push” each other, but they will still overlap a little.
In the above picture, my characters heads overlap but their mesh’s will start to push each other only when their torso/body overlaps. I checked, this is not their collider capsule’s overlapping. I set those to a very small radius.
I’m trying to get it so when they play a punch animation, their arms will get blocked by the other character’s mesh and not clip through it.
Hey there @Fairchild1! So first things first let’s clear up how collisions work, and then I’ll explain what you can use to make your SKM have some collision.
Generally, collisions are handled by the root object, in characters this is the capsule. Every child object under that will not contribute to movement check collisions, but will still be able to trigger overlaps. Everything under it inherits the root’s data. Character components work on the principal that the capsule IS the character, and everything under it is visual. This makes it very easy to spin a character up and get it moving within minutes.
SKMs can actually have collision, but I promise you don’t want to poll every vertex on any SKM every frame indefinitely. So how do we get around this? Physics assets! Basically you can have a really simplified set of collisions for your SKM that you can use for reactions, ragdolls, or locational damage. First you’ll need to read up on PHaTs and how they are generated and used, then you’ll need to look into physical animation blending so your arms aren’t able to go into walls. The content examples project has some excellent examples to go over if you’d like to see it in action in a project before starting this endeavor. If not, here’s some documentation and tutorials to help you get started!
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
Documentation: Creating physics assets:
Documentation: Physics Based Animation:
Tutorial on the basics:
In his video he makes the whole body partially physically simulated, but in your case if you want it to be just the arm you’d have to designate that at the shoulder’s root.