How to detect if the child of a pawn is hit?

Is it possible to detect a collision with a specific child(static mesh) of a pawn?

For example, a space game’s ‘BossPawn’ has moving children components. A collision with the left of the boss does an event, while collision with the right does a different event.

An ‘Event Hit’ call can Cast To a parent (‘BossPawn’), but I can’t find anything on how to check if a child of that parent was collided with (ex. ‘LeftWing’).

Thanks for the help!

-NINO

Hi there,

yes, you can detect collision with specific meshes.

I guess you do not want to use several Actors and stick them together with ChildActorComponents. If you use a single Actor with multiple MeshComponents that should do. You can move the parts within the Actor like they would be separated parts/Ships. But you need to keep in mind that on movement only the root mesh collision will stop the Ship from going through obstacles. You can also put put a bigger collider around the whole ship to block movement.

Here something to start with:

You need to prepare a Pawn for that. Enable “Simulation Generate Hit Events” for the MeshComponents. And you get their OnComponentHit Nodes by selecting the Event on the bottom of the details.

Hope that helps :slight_smile: Marooney

Marooney!

I really a appreciate the detail of your reply. I will certainly be able to work with this. Thanks for the tip too about using ChildActorComponents. It may be better for me to rework some things to take that route.

Thanks a ton,

-NINO