Class RuleElevationPenalty Extends GridGraphRule
Applies penalty based on the elevation of the node.
This is useful if you for example want to discourage agents from walking high up in mountain regions.
The penalty applied is equivalent to:
penalty = curve.evaluate(Mathf.Clamp01(Mathf.InverseLerp(lower elevation range, upper elevation range, elevation))) * penaltyScale
Called when the rule is removed or the graph is destroyed.
Does preprocessing and adds callbacks to the GridGraphRules object.
Inherited Public Members
Iterate through all nodes.
Returns the data index for a node's neighbour in the given direction.
Hash of the settings for this rule.
Where in the scanning process a rule will be executed.
Call if you have changed any setting of the rule.
Only enabled rules are executed.