Class PuddleSplatInstance
- Namespace
- DFA.Puddlecraft
A splat stamped into the scene. Only a reference plus a position, yaw and size: moving, resizing or swapping the splat never loses anything.
[ExecuteAlways]
[DisallowMultipleComponent]
[AddComponentMenu("Puddlecraft/Puddle Splat")]
[Icon("Packages/com.dfa.puddlecraft/editor/icons/puddle-splat.png")]
public sealed class PuddleSplatInstance : PuddlecraftBehaviour
- Inheritance
-
PuddleSplatInstance
Properties
blend
How this splat combines with others it overlaps.
public SplatBlend blend { get; set; }
Property Value
boxToWorld
Maps the unit box (-0.5 to 0.5 on each axis) to the splat's world-space volume.
public Matrix4x4 boxToWorld { get; }
Property Value
ignoreCover
Whether the puddle holds water under roofs too: the bake keeps the parts that rain can't reach instead of taking them away. Takes effect when the puddles are baked.
public bool ignoreCover { get; set; }
Property Value
ignoreRain
Whether the puddle is always full, whatever the weather, instead of filling in the rain and draining when it stops. Takes effect when the puddles are baked.
public bool ignoreRain { get; set; }
Property Value
projectionDepth
Vertical reach of the splat above and below its position, in metres (at least 0.05).
public float projectionDepth { get; set; }
Property Value
size
Width (X) and length (Z) of the splat in metres, each at least 0.05.
public Vector2 size { get; set; }
Property Value
splat
The shape stamped here.
public PuddleSplat splat { get; set; }
Property Value
strength
Multiplies the splat's depth, 0 to 2.
public float strength { get; set; }
Property Value
yawRotation
Rotation with pitch and roll removed. Splats always project along world up.
public Quaternion yawRotation { get; }
Property Value
Methods
UvToWorld(Vector2)
World position of a splat UV on the splat's flat plane.
public Vector3 UvToWorld(Vector2 uv)
Parameters
uvVector2