water area detection
by Gordon Walton · in Torque Game Engine · 01/22/2003 (4:34 pm) · 1 replies
Being relatively new to torque, I have a question that I cannot find the answer to.
Is it possible to detect when a player is underwater so that the player can remain on the surface until an action button is pressed and change the player anim to a swim when they dive underneath? The desired effect would be to be able to do this, and start an air timer so the player knows when they have to surface again.
Gordo
Is it possible to detect when a player is underwater so that the player can remain on the surface until an action button is pressed and change the player anim to a swim when they dive underneath? The desired effect would be to be able to do this, and start an air timer so the player knows when they have to surface again.
Gordo
About the author
Torque 3D Owner Bruce Wallace
Search through torque\engine\game\player.cc for water or liquid to get an idea of how the current water detection code works.
Also
Script callbacks onEnterLiquid and onLeaveLiquid are called when a Player enters or exits water.
hope that gives you somewhere to start.
Bruce