Class PuddlecraftTracks
- Namespace
- DFA.Puddlecraft
Wet tracks on dry ground: footprints and tyre tracks left by something that came out of a puddle. Tracks dry from their edges in.
With Materials shading, tracks merge into the wet ground of Puddlecraft materials, darkening and glossing them the way rain does, and only on the surface they were left on (not on a roof above or a floor below). With Overlay shading, and wherever tracks on two levels overlap, they are drawn over the finished image instead.
Up to Capacity tracks are kept at once; beyond that, the oldest are removed first.
public static class PuddlecraftTracks
- Inheritance
-
PuddlecraftTracks
Fields
Capacity
How many tracks are kept at once.
public const int Capacity = 4096
Field Value
Properties
dryTime
Seconds a fully wet track takes to dry (1 or more). Drier tracks dry sooner. Applies to new tracks.
public static float dryTime { get; set; }
Property Value
Methods
AddTrail(Vector3, Vector3, float, float, float)
Leaves a wet tyre track along a path, such as a wheel's contact point last frame and this frame.
width is the tread width in metres and wetness runs from 0 (nothing) to 1
(straight out of a puddle). distance is how far the wheel had rolled at
from, in metres, so the tread pattern continues from one segment to the next.
public static void AddTrail(Vector3 from, Vector3 to, float width, float wetness, float distance = 0)
Parameters
Clear()
Removes every track.
public static void Clear()
Stamp(Vector3, Vector3, float, float)
Leaves a wet footprint. heel and toe are its ends on the ground (each at
its own height, so a footprint can lie on a slope),
width how wide the sole is in metres, and wetness how wet it is, from 0
(nothing) to 1 (straight out of a puddle).
public static void Stamp(Vector3 heel, Vector3 toe, float width, float wetness)