Collision detection of skeletal mesh components

Currently I’m making a pawn BP class to use skeletal mesh components for its collision. However, hit cannot be detected when the skeletal mesh components overlap with static meshes. How can I detect collisions with skeletal mesh physical assets?
Simulating physics on skeletal meshes doesn’t seem to be acceptable since it will make random bendings of skeletal meshes. Now all movement (including gravity, input, collision, etc) is handled with a Floating Pawn Movement component.
Is it possible to detect collision when the skeletal mesh (with physics assets) hit something without simulating physics? Thank you very much.

Hey! You could set your other object to Simulate Physics + Generate Overlap Events and have it only Overlap (not Block) the Object Type of your Skeletal Mesh. Then, in your Skeletal mesh make sure you also have Generate Overlap Events and you could detect the collision via the OnOverlap Event.

Thank you for your concerning.
It’s easy to get overlap with OnComponentOverlap event or GetOverlappingActor/Component function. The problem is I need to know the Hit Location and Hit Normal data when collision happens to my skeletal mesh component. Is there any method to make Hit Result besides Simulate Physics?
I don’t think it’s a good idea to make static meshes simulate physics. It will cost much resource and may cause unexpected movement of static meshes…

You can get ImpactPoint and ImpactNormal vectors if you break the SweepHit from the onComponentBeginOverlap Event, would you be able to use these? Ultimately yes, you’d have to be simulating physics for this Hit to output data. That said, having everything happen on Overlap will prevent you from having undesired collisions happen between your SM and your SK since the least colliding option will always be chosen when two objects with different Collision Responses meet… meaning that if a “Block All” intersects an “Overlap All” the result will be Overlap All.
As far as resources for simulating physics on SMs, it all depends on your target hardware and the shape of the collision object. For example, you can have an SM that is a sphere of 2K tris but you can still give it a Spherical collision via the SM editor, which will make it much cheaper than giving it per-poly collision. Likewise you can have very complex objects with simplified UCX colliders that will cause little overhead.

I tried to use OnComponentBeginOverlap and OnComponentHit events. When the SK overlaps, Overlap event generates but boolean “From Sweep” is false. OnComponentHit event doesn’t generate at all. Why does this happen?

What are the collision response settings of your objects?

Collision response of SK is Block All and SM is Default.

By the way, is collision supported in Floating Pawn Movement components? I handle all movement in a FPMovement.

The problem solved. Pawn Movement component applies sweep only on the root component. Component event generated when I set the SK mesh as root component.

1 Like