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!
asked Jul 28 '16 at 02:16 AM in Blueprint Scripting
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 :) Marooney
answered Jul 28 '16 at 04:05 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here