Child actor not collided correctly
I'm struggling with this problem for maybe a week and I can't get how to correct it.
I have a MeleeWeapon blueprint that must call the function "ReceiveAttack" of a Player or NPC when it collides with one or another. The problem is with shields. I want to do something else to ReceiveAttack when it's a shield which was touched.
The Shield Actor is a child actor of my Player or NPC and is attached to the mesh.
My Shield actor has a correct collision and can overlap with the MeleeWeapon as it prints "hello" to the screen when something touches it. But when I have the OnBeginOverlap event on my MeleeWeapon (or OnComponentBeginOverlap), the shield is never shown as overlapped.
I think it's a problem about the shield being child of another actor or attached to the mesh.
I also tried with ComponentBeginOverlap, but it only says the weapon overlapped with the mesh.
Here are some screenshots :
MeleeWeapon, with the print string that only shows Player as overlapped, or Mesh as component :
Shield, that says hello when overlapping the weapon :
A screenshot of the game. It says Player26 for my character, TestNPC2 for the attacking NPC and Hello when my shield is sensing an overlap :
Thank you for your help, ManuHeel.
asked Apr 17 '16 at 12:00 PM in Blueprint Scripting
I finally "corrected" the problem by myself after changing the way it works.
I now have a blocking collision for my shields created at the player spawn and attached to the player mesh, and it moves and activates according to the shield usage.
I really think it's a problem coming from child actors, but I must say I'm a bit disappointed no one tried to help me.
Hope this will help someone.
answered May 14 '16 at 09:37 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here