Add area_stay() signal #8539
venilark
started this conversation in
Engine Core
Replies: 1 comment
-
This is likely to be bad for performance, sending signals every frame is expensive |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If I am playing a game with invincibility frames and dodge too soon, I will hit the enemy's hitbox and area_entered will be called, then the invincibility runs out but I was invincible during area_entered so I remain invincible. To solve this I need an array of entities that collided with the hitbox and a foreach inside _physics_process(). Also I need area_exited to know when I have to remove that area from the array, which means more checks.
This one extra signal would solve this.
Should be the equivalent of Unity's OnTriggerStay.
I'm aware get_overlapping_areas() can also be used but I think this addition would be helpful.
Beta Was this translation helpful? Give feedback.
All reactions