Deathzone or check for a max y value?

I know any extra performance gained would be minimal. But I’m curious which would be more optimal in Godot, in terms of performance. So Area2D/collision or just checking to see if the player has passed a set maximum y value?

cant say just how much quicker, ive never dug that deep.
but as far as i can tell, a single position comparison will be quicker than a collision check, but as you say any performance gained would be minimal.

1 Like

Performance gain would definitely be very little. But it can be important if you have a ton of Area2D’s in the scene.
Other than that this comes down to your preferred way of doing things.
Using an Area2D you are able to see the actual collision shape in the editor and edit it.
If you do this in a script you are not going to get those benefits. But you can do more custom checks in there that you can’t achieve with only using the node.

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms