Table of Contents

Class DripEdge

Namespace
DFA.Puddlecraft

A hand-drawn edge that water drips from, such as an overhanging ledge or eave without a gutter. Where each drop lands is worked out in the editor, so no colliders are needed at runtime.

[ExecuteAlways]
[DisallowMultipleComponent]
[AddComponentMenu("Puddlecraft/Drip Edge")]
[Icon("Packages/com.dfa.puddlecraft/editor/icons/drip-edge.png")]
public sealed class DripEdge : PuddlecraftBehaviour
Inheritance
DripEdge

Properties

alwaysOn

Drips at full strength whatever the weather.

public bool alwaysOn { get; set; }

Property Value

bool

dripRate

Drops per metre of edge per second at full rain (0 or more). 0 stops the edge dripping.

public float dripRate { get; set; }

Property Value

float

impactSpacing

Distance between baked landing points along the edge, in metres (at least 0.02). Outside Play mode the editor traces the landing points again after a change.

public float impactSpacing { get; set; }

Property Value

float

impacts

The baked landing points, one per release point along the edge.

public IReadOnlyList<DripEdge.Impact> impacts { get; }

Property Value

IReadOnlyList<DripEdge.Impact>

length

Length of the edge in metres.

public float length { get; }

Property Value

float

pointCount

Number of points along the edge.

public int pointCount { get; }

Property Value

int

roofSize

How far the roof stretches back from the edge, in metres (0 or more): bigger roofs lag further behind the rain.

public float roofSize { get; set; }

Property Value

float

Methods

GetOutward(int)

Horizontal direction pointing away from the ledge face at a point.

public Vector3 GetOutward(int index)

Parameters

index int

Returns

Vector3

GetPoint(int)

World position of a point along the edge.

public Vector3 GetPoint(int index)

Parameters

index int

Returns

Vector3