Provides access to data and methods related to an agent's social force state.
This can be used in custom social force fields to get/set forces on the agent. It can also be used in other contexts to retrieve information about the current social forces acting upon the agent.
center | The agent's current center point. |
force | The agent's current force. |
friction | The scalar value of the agent's current friction force. This is only applicable if the agent has a friction force applied. |
goal | The agent's current goal location. |
hasGoal | 1 if the agent currently has a goal, 0 otherwise. |
velocity | The agent's current velocity. |
Vec3 force
The agent's current force.
You can only set this force as part of a custom social force.
readonly double friction
The scalar value of the agent's current friction force. This is only applicable if the agent has a friction force applied.
readonly int hasGoal
1 if the agent currently has a goal, 0 otherwise.