Arrive:
Filter:
GameLoop/Classes (extension) | Class

Arrive
ExtensionExtension

Implementation of the arrive steering behaviour

Description

Arrive is a behavior that steers the agent in such a way it decelerates onto the target position.

Class Methods

.new

Arguments:

entity

the entity on which the steering force will be applied

targetPos

the position of arrival

deceleration

a number from 1 to 3 (low = 3, normal = 2, fast = 1)

tweak

a number that is multiplied with the deceleration. For tweaking (duh)

Instance Methods

.value

Get the calculated force. To be used in the .force_ method of the entity. This is how the steering forces are applied.