Directional Shield Blocking

I have a system that puts both AI and player character in blocking states where they raise their shield and the attack is blocked. Like most games this blocking system doesn’t allow you to hit the feet or back of the character though. My goal is to have the attack blocked only if it hits the shield. I can’t seem to figure this process out.

I’ve tried adding adding and removing a tag to the shield collision for the blocking state but it doesn’t appear that overlapped objects can read tags.

I’m also confused about the overlap events and how to find my object. If I set it up to find my shield it still counts as false because other objects get overlapped too and they are not shields.

Can anyone provide some advice for this?

Hey, why don’t you just create a boolean variable on your character like “isBlocking” and set it to true when the shield is raised up? (I imagine you have an event or input to raise the shield) and then on the “take damage” piece of code you just do a branch testing if the variable “isBlocking” is true, if it is, just don’t apply any damage to the character’s health.

On the other way, to find objects on overlap events you can check for tags (if they are propely set on the actor) with the “Actor has tag” node. Notice that you can have component tags and actor tags, it’s key to set the proper one.

Hope this helps!