Sweet spot/ tipper hurtboxes are additional hurtboxes for an attack that if it hits the player, it will have different behavior (often, more damage or some extra stun) than the “sour spots”. But these sweet spots can often be inside of the sour spot hurtbox. How would I make it so that when both hurtboxes hit an entity, the entity is only affected by the highest priority hitbox?
Sorry I made the question misleading and edited to better reflect it. What I really was meaning was how I would make sure that when both hurtboxes collide with the player on the same physics frame, that the “better” one will activate their effect and prevent the other from doing its action. Unless physics layers solve this issue too? Because it doesn’t seem to be consistent. Mostly what I am wondering is how to make a system that checks for the higher priority(defined by an export variable for each hurtbox)of the hurtboxes that the player is currently colliding with and execute its desired function (how would you pass the hurtbox function to the thing queuing and processing the currently colliding objects? would they need to be predefined in the handler?).
Okay I figured out the first part (making sure only the best one executes) by just having the hurtboxes send a signal to add themselves to a currently_colliding table in a higher node and just reading their priority value, but how would I make a callable function within the hurtbox that can be called by other nodes and acts upon the colliding player?