CameraInjectVisibleNodeClosestToDistance
class CameraInjectVisibleNodeClosestToDistance(reaction: NodeReaction<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule) : AbstractLocalAction<Any> (source)
Given a list of VisibleNode associated to visionMolecule, it finds the closest to a point located at distance from the node owning this action in the direction of its heading, and injects its position in targetMolecule.
If there are no VisibleNodes, targetMolecule will be removed from the node.
Constructors
Link copied to clipboard
constructor(reaction: NodeReaction<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule)