Disable blocking collision but allow line trace

I have a dragon character which has the default capsule component and a skeletal mesh. I am using the capsule collision only for blocking WorldDynamic, and using the physics asset of the skeletal mesh for blocking other players.

I’m struggling with the collision settings of both physics asset and the character blueprint.
What I want to achieve is:

  1. Allow line trace event to fire when a physics primitive is hit
  2. Allow blocking collision to occur in specific physics primitives
    (Other players can hit the monster in any part and events should fire respectively, but not all parts should block that player, e.g. foot should block but wing shouldn’t)

However, if I turn off the collision of the physics primitive, that part of the body doesn’t get line traced. Is there any way I can achieve the wanted behavior? I tried various combinations of the settings (physics asset - Collision Response, Primitives - Collision Enabled,).

Any suggestions are welcomed
p.s. I must use line trace to get the location of a hit event, and please ignore the custom object type in the character blueprint; I was just testing

My current settings of the dragon character blueprint:

Capsule component:
image

Mesh:
image

One example of a physics body:

you could make a custom trace channel just to ensure line traces will always work against the dragon, then handle the object collision just as you are.

if you have a custom channel called something like “enemy” and set the physics bodies to block that (and everything else ignores this channel), i think that gets you desired behavior and doesn’t change much of what you have setup already.

Thanks for your suggestion. I have created a custom channel ‘PlayerAttack’ and set it to ‘Ignore’ in the capsule component and ‘Block’ in the mesh. The trace works.
But the issue is that I still cannot set the collision response of individual physics bodies in a single skeletal mesh. If I set the collision response of a physics body (e.g. wing) to ‘Disabled’, then that body does not get traced. I want it to be traced but not blocked. I have set Collision Enabled to ‘Query Only’.

It looks like it is not possible to set a per channel response for each physics body, like you can with static mesh components. So that is the crux of the problem if I am understanding correctly.

Perhaps it is possible to expose that through c++, but I can suggest at least a workaround based on something I did before, which is basically to make your own custom collision bodies and make them child to bones on the mesh (essentially doing the same thing as physics body, but you only use it for collision queries).

So the simple setup is add a static mesh component as child to the main Mesh, set it to follow some bone, and then you can set its collision to Custom and then flag each channel however you need. So you could make the feet behave one way, and the head another way.

I have no idea if that’s the best solution but it should work. I used similar thing in a hunting game prototype to test for vital organ hits.

*collision presets that can be set per static mesh component:

anything that is child of the Mesh in a character can have a parent socket (this way it will follow animations correctly):
image

I get what you’re saying. Sometimes a workaround may be a better option. Plus now I know that what I was trying to do is not achievable solely from the physics asset and trace settings… I was struggling for days with those setups :smiling_face_with_tear: Would definitely try your suggestion tomorrow, thanks! Oh and if you by any chance know how to set the settings via c++, please share.

I don’t unfortunately, I just know that often times some little omission in blueprints like that may be pretty simple to expose through c++, but i’m so slow with c++ i usually just stick with a blueprint workaround if its possible.

just to be clear I don’t know that it is possible in this case to expose that functionality - it might be missing for a reason - i just figured i’d mention in case you wanted to explore the idea is all.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.