Hello, I'm modifying a multiplayer FPS project to learn, but I can't figure out how to make that when the player reaches or pass a certain height (Y axis) dies. I added a mesh instance (No collision) that is a big sea, so I want to make that when the player falls into the water dies at a specific Y axis value, for example, Y = -25.
Here's a code in the project that kills the player at a certain distance from the Vector3.ZERO, but it's not what I want because this code kills the player at a specific distance no matter the axis:
if translation.distancesquaredto(Vector3.ZERO) >= 40000:
I tried to use the node Area but failed, so I think that making the player dies at a certain height is simpler.