Class PuddleQuery
- Namespace
- DFA.Puddlecraft
Asks what water is at a position, placed puddles and procedural ones: for footsteps, splashes, tyre spray or gameplay.
public static class PuddleQuery
- Inheritance
-
PuddleQuery
Methods
TryGetPuddleAt(Vector3, out PuddleHit, float)
Looks up the water at a world position, following the current rain state: placed puddles, and procedural
puddles on the ground below (found with a raycast, so the ground needs a collider on one of the
controller's receiverLayers (Gets Wet), and a material with a Puddles value, _PuddlecraftPuddles, as
Puddlecraft/Lit (Wet) has). Returns false with no enabled controller, or where there is no puddle data or
ground within verticalTolerance of the position (a character's feet should be within it).
public static bool TryGetPuddleAt(Vector3 position, out PuddleHit hit, float verticalTolerance = 0.3)