CameraInjectVisibleNodeClosestToDistance
class CameraInjectVisibleNodeClosestToDistance(reaction: NodeReaction<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule) : AbstractLocalAction<Any>
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)
Properties
Link copied to clipboard
The NodeReaction owning this action, hosted by targetNode.
Link copied to clipboard
Functions
Link copied to clipboard
Creates an equivalent action owned by newReaction, such as a reaction cloned onto a new node. An action targeting the host of its reaction targets the host of newReaction, which must then be a Node; an action targeting any other node keeps its target.
Link copied to clipboard