Magnet field

Magnet field

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




Attributes

Attributes

Type

Overridable

Description

Attributes

Type

Overridable

Description

weight

double

yes

Weight

mode

int

no

The mode: Repulsion (0) or Attraction (1)

magnetSource

int

no

he type of the source magnet force

referencePosition

vector3

no

The position of the source magnet force

mesh

mesh

no

The mesh to use as source of the magnet force

meshParentMatrix

matrix

no

The mesh parent matrix

meshTranslation

vector3

no

The mesh translation

meshScale

vector3

no

The mesh scale

meshRotation

vector3

no

The mesh rotation

meshAnimated

bool

no

If true, the geometry data is refreshed at each frame

bothDirections

bool

no

If true, compute the force respect to the mesh ignoring the normal of the surface

distance

double

yes

The min distance to the source that triggers the magent force

forceMultiplier

double

yes

A factor used to multiply the magnet force.

maxTurnAngle

double

no

The max turn angle

velocityThreshold

double

no

The velocity threshold. If the agent velocity magnitude is lower than this value the agent is not evaluated

editMetadata

bool

no

If 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

metadataType

int

no

The metadata type, can be int (3) or double (4)

metadataName

string 

no

The target metadata name

metadataMultiplier

double

yes

The factor to multiply the metadata value

metadataMin

double

no

Min clamping metadata value

metadataMax

double

no

Max clamping metadata value

alignAtInitSimulation

bool

no

If 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

alignAtInitFrame

bool

no

If 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

multiplierAxis

vector3

no

The axis multiplier used to apply the force. Used this if you want the agents only the affected on one axis

debug

bool

no

Activate the debugging mode

ignoreNextDirectionalModules

bool

yes

If enabled, all next directional modules in the stack will be ignored.

editLocomotionAngularVelocity

bool

yes

If on, this module will edit the targetAngularVelocity metadata used by the locomotion system.




Copyright © 2017, Toolchefs LTD.