Table of Contents

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

SplatBlend

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

Matrix4x4

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

bool

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

bool

projectionDepth

Vertical reach of the splat above and below its position, in metres (at least 0.05).

public float projectionDepth { get; set; }

Property Value

float

size

Width (X) and length (Z) of the splat in metres, each at least 0.05.

public Vector2 size { get; set; }

Property Value

Vector2

splat

The shape stamped here.

public PuddleSplat splat { get; set; }

Property Value

PuddleSplat

strength

Multiplies the splat's depth, 0 to 2.

public float strength { get; set; }

Property Value

float

yawRotation

Rotation with pitch and roll removed. Splats always project along world up.

public Quaternion yawRotation { get; }

Property Value

Quaternion

Methods

UvToWorld(Vector2)

World position of a splat UV on the splat's flat plane.

public Vector3 UvToWorld(Vector2 uv)

Parameters

uv Vector2

Returns

Vector3