Skip to main content

VelocityLimit

A class in Root.Township, Alta.Intelligence.

Scoring rule on the creature's own speed: one value while its rigidbody is slower than a limit, another when at or above it. Made by CreateTargetOperation.VelocityLimit.

Constructors​

MemberWhat it is
VelocityLimit(float maximimumVelocitySquared, float withinLimitValue, float outsideLimitValue)Creates a VelocityLimit from maximimumVelocitySquared, withinLimitValue and outsideLimitValue.

Fields​

3 private and internal fields
MemberWhat it is
private float outsideLimitValueValue at or above the limit.
private float velocityLimitSquaredThe speed limit, squared.
private float withinLimitValueValue below the limit.

Methods​

MemberWhat it is
override float Evaluate(Agent agent, ITarget target)Returns withinLimitValue if the rigidbody's squared speed is below the limit, else outsideLimitValue.