Magnet field

The magnet field applies an repulsion/attraction force to the agents.



Attributes

AttributesTypeOverridableDescription
weightdoubleyesWeight
modeintnoThe mode: Repulsion (0) or Attraction (1)
magnetSourceintnohe type of the source magnet force
referencePositionvector3noThe position of the source magnet force
meshmeshnoThe mesh to use as source of the magnet force
meshParentMatrixmatrixnoThe mesh parent matrix
meshTranslationvector3noThe mesh translation
meshScalevector3noThe mesh scale
meshRotationvector3noThe mesh rotation
meshAnimatedboolnoIf true, the geometry data is refreshed at each frame
bothDirectionsboolnoIf true, compute the force respect to the mesh ignoring the normal of the surface
distancedoubleyesThe min distance to the source that triggers the magent force
forceMultiplierdoubleyesA factor used to multiply the magnet force.
maxTurnAngledoublenoThe max turn angle
velocityThresholddoublenoThe velocity threshold. If the agent velocity magnitude is lower than this value the agent is not evaluated
editMetadataboolnoIf on, the module will assign the value of the ratio between current position and the reference point/mesh multiplied by the metadataMultiplier to the given metadata.
If the metadata already exists then the value is going to summed to the current metadata value. The value is always clamped with metadataMin and metadataMax
metadataTypeintnoThe metadata type, can be int (3) or double (4)
metadataNamestring noThe target metadata name
metadataMultiplierdoubleyesThe factor to multiply the metadata value
metadataMindoublenoMin clamping metadata value
metadataMaxdoublenoMax clamping metadata value
alignAtInitSimulationboolnoIf true, the agents will be aligned by the magnet force at the init simulation event if they start the simulation inside the volume of influence
alignAtInitFrameboolnoIf true, the agents will be aligned by the magnet force at the init frame event if they are inside the volume of influence at the current frame
multiplierAxisvector3noThe axis multiplier used to apply the force. Used this if you want the agents only the affected on one axis
debugboolnoActivate the debugging mode
ignoreNextDirectionalModulesboolyesIf enabled, all next directional modules in the stack will be ignored.
editLocomotionAngularVelocityboolyesIf on, this module will edit the targetAngularVelocity metadata used by the locomotion system.


Copyright © 2017, Toolchefs LTD.