"description":" A specialized steering agent that updates itself every frame so the user does\n not have to using a KinematicBody2D\n category: Specialized agents\n",
"description":" A specialized steering agent that updates itself every frame so the user does\n not have to using a KinematicBody\n category: Specialized agents\n",
"description":" A specialized steering agent that updates itself every frame so the user does\n not have to using a RigidBody2D\n category: Specialized agents\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"body",
"data_type":"RigidBody2D",
"default_value":null,
"setter":"_set_body",
"getter":"",
"export":false,
"signature":"var body: RigidBody2D",
"description":" The RigidBody2D to keep track of\n"
"description":" A specialized steering agent that updates itself every frame so the user does\n not have to using a RigidBody\n category: Specialized agents\n",
"description":" A base class for a specialized steering agent that updates itself every frame\n so the user does not have to. All other specialized agents derive from this.\n category: Specialized agents\n tags: abstract\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"calculate_velocities",
"data_type":"bool",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var calculate_velocities: bool",
"description":" If `true`, calculates linear and angular velocities based on the previous\n frame. When `false`, the user must keep those values updated.\n"
},
{
"name":"apply_linear_drag",
"data_type":"bool",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var apply_linear_drag: bool",
"description":" If `true`, interpolates the current linear velocity towards 0 by the \n `linear_drag_percentage` value.\n Does not apply to `RigidBody` and `RigidBody2D` nodes.\n"
},
{
"name":"apply_angular_drag",
"data_type":"bool",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var apply_angular_drag: bool",
"description":" If `true`, interpolates the current angular velocity towards 0 by the\n `angular_drag_percentage` value.\n Does not apply to `RigidBody` and `RigidBody2D` nodes.\n"
},
{
"name":"linear_drag_percentage",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var linear_drag_percentage: float",
"description":" The percentage between the current linear velocity and 0 to interpolate by if\n `apply_linear_drag` is true.\n Does not apply to `RigidBody` and `RigidBody2D` nodes.\n"
},
{
"name":"angular_drag_percentage",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var angular_drag_percentage: float",
"description":" The percentage between the current angular velocity and 0 to interpolate by if\n `apply_angular_drag` is true.\n Does not apply to `RigidBody` and `RigidBody2D` nodes.\n"
"description":" Moves the agent's body by target `acceleration`.\n tags: virtual\n",
"arguments":[
{
"name":"_acceleration",
"type":"GSAITargetAcceleration"
},
{
"name":"_delta",
"type":"float"
}
]
}
],
"static_functions":[
]
},
{
"name":"GSAIArrive",
"path":"res://src/Behaviors/GSAIArrive.gd",
"extends_class":[
"GSAISteeringBehavior"
],
"extends_file":"",
"icon":"",
"signature":"class GSAIArrive",
"description":" Calculates acceleration to take an agent to its target's location. The\n calculation attempts to arrive with zero remaining velocity.\n category: Individual behaviors\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"target",
"data_type":"GSAIAgentLocation",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var target: GSAIAgentLocation",
"description":" Target agent to arrive to.\n"
},
{
"name":"arrival_tolerance",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var arrival_tolerance: float",
"description":" Distance from the target for the agent to be considered successfully\n arrived.\n"
},
{
"name":"deceleration_radius",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var deceleration_radius: float",
"description":" Distance from the target for the agent to begin slowing down.\n"
},
{
"name":"time_to_reach",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var time_to_reach: float",
"description":" Represents the time it takes to change acceleration.\n"
"description":" Callback for the proximity to call when finding neighbors. Keeps track of every `neighbor`\n that was found but only keeps the one the owning agent will most likely collide with.\n tags: virtual\n",
"arguments":[
{
"name":"neighbor",
"type":"GSAISteeringAgent"
}
]
}
],
"static_functions":[
]
},
{
"name":"GSAIBlend",
"path":"res://src/Behaviors/GSAIBlend.gd",
"extends_class":[
"GSAISteeringBehavior"
],
"extends_file":"",
"icon":"",
"signature":"class GSAIBlend",
"description":" Blends multiple steering behaviors into one, and returns a weighted\n acceleration from their calculations.\n\n Stores the behaviors internally as dictionaries of the form\n {\n \tbehavior : GSAISteeringBehavior,\n \tweight : float\n }\n category: Combination behaviors\n",
"description":" Calculates an acceleration that attempts to move the agent towards the center\n of mass of the agents in the area defined by the `GSAIProximity`.\n category: Group behaviors\n",
"description":" Callback for the proximity to call when finding neighbors. Adds `neighbor`'s position\n to the center of mass of the group.\n tags: virtual\n",
"arguments":[
{
"name":"neighbor",
"type":"GSAISteeringAgent"
}
]
}
],
"static_functions":[
]
},
{
"name":"GSAIEvade",
"path":"res://src/Behaviors/GSAIEvade.gd",
"extends_class":[
"GSAIPursue"
],
"extends_file":"",
"icon":"",
"signature":"class GSAIEvade",
"description":" Calculates acceleration to take an agent away from where a target agent is\n moving.\n category: Individual behaviors\n",
"description":" Calculates angular acceleration to rotate a target to face its target's\n position. The behavior attemps to arrive with zero remaining angular velocity.\n category: Individual behaviors\n",
"description":" Produces a linear acceleration that moves the agent along the specified path.\n category: Individual behaviors\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"path",
"data_type":"GSAIPath",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var path: GSAIPath",
"description":" The path to follow and travel along.\n"
},
{
"name":"path_offset",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var path_offset: float",
"description":" The distance along the path to generate the next target position.\n"
},
{
"name":"is_arrive_enabled",
"data_type":"bool",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var is_arrive_enabled: bool",
"description":" Whether to use `GSAIArrive` behavior on an open path.\n"
},
{
"name":"prediction_time",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var prediction_time: float",
"description":" The amount of time in the future to predict the owning agent's position along\n the path. Setting it to 0.0 will force non-predictive path following.\n"
"description":" Calculates an angular acceleration to match an agent's orientation to that of\n its target. Attempts to make the agent arrive with zero remaining angular\n velocity.\n category: Individual behaviors\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"target",
"data_type":"GSAIAgentLocation",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var target: GSAIAgentLocation",
"description":" The target orientation for the behavior to try and match rotations to.\n"
},
{
"name":"alignment_tolerance",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var alignment_tolerance: float",
"description":" The amount of distance in radians for the behavior to consider itself close\n enough to be matching the target agent's rotation.\n"
},
{
"name":"deceleration_radius",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var deceleration_radius: float",
"description":" The amount of distance in radians from the goal to start slowing down.\n"
},
{
"name":"time_to_reach",
"data_type":"float",
"default_value":0.1,
"setter":"",
"getter":"",
"export":false,
"signature":"var time_to_reach: float = 0.1",
"description":" The amount of time to reach the target velocity\n"
},
{
"name":"use_z",
"data_type":"bool",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var use_z: bool",
"description":" Whether to use the X and Z components instead of X and Y components when\n determining angles. X and Z should be used in 3D.\n"
"description":" Container for multiple behaviors that returns the result of the first child\n behavior with non-zero acceleration.\n category: Combination behaviors\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"_behaviors",
"data_type":"Array",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var _behaviors: Array",
"description":""
},
{
"name":"last_selected_index",
"data_type":"int",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var last_selected_index: int",
"description":" The index of the last behavior the container prioritized.\n"
},
{
"name":"zero_threshold",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var zero_threshold: float",
"description":" If a behavior's acceleration is lower than this threshold, the container\n considers it has an acceleration of zero.\n"
"description":" Calculates an acceleration to make an agent intercept another based on the\n target agent's movement.\n category: Individual behaviors\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"target",
"data_type":"GSAISteeringAgent",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var target: GSAISteeringAgent",
"description":" The target agent that the behavior is trying to intercept.\n"
},
{
"name":"predict_time_max",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var predict_time_max: float",
"description":" The maximum amount of time in the future the behavior predicts the target's\n location.\n"
"description":" Calculates an acceleration that repels the agent from its neighbors in the\n given `GSAIProximity`.\n\n The acceleration is an average based on all neighbors, multiplied by a\n strength decreasing by the inverse square law in relation to distance, and it\n accumulates.\n category: Group behaviors\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"decay_coefficient",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var decay_coefficient: float",
"description":" The coefficient to calculate how fast the separation strength decays with distance.\n"
"description":" Callback for the proximity to call when finding neighbors. Determines the amount of\n acceleration that `neighbor` imposes based on its distance from the owner agent.\n tags: virtual\n",
"arguments":[
{
"name":"neighbor",
"type":"GSAISteeringAgent"
}
]
}
],
"static_functions":[
]
},
{
"name":"GSAIAgentLocation",
"path":"res://src/GSAIAgentLocation.gd",
"extends_class":[
],
"extends_file":"",
"icon":"",
"signature":"class GSAIAgentLocation",
"description":" Represents an agent with only a location and an orientation.\n category: Base types\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"position",
"data_type":"Vector3",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var position: Vector3",
"description":" The agent's position in space.\n"
},
{
"name":"orientation",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var orientation: float",
"description":" The agent's orientation on its Y axis rotation.\n"
}
],
"signals":[
],
"methods":[
],
"static_functions":[
]
},
{
"name":"GSAIGroupBehavior",
"path":"res://src/GSAIGroupBehavior.gd",
"extends_class":[
"GSAISteeringBehavior"
],
"extends_file":"",
"icon":"",
"signature":"class GSAIGroupBehavior",
"description":" Base type for group-based steering behaviors.\n category: Base types\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"proximity",
"data_type":"GSAIProximity",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var proximity: GSAIProximity",
"description":" Container to find neighbors of the agent and calculate group behavior.\n"
"description":" Adds velocity, speed, and size data to `GSAIAgentLocation`.\n\n It is the character's responsibility to keep this information up to date for\n the steering toolkit to work correctly.\n category: Base types\n",
"description":" The maximum amount of angular acceleration that any behavior can apply to an\n agent.\n"
},
{
"name":"linear_velocity",
"data_type":"Vector3",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var linear_velocity: Vector3",
"description":" Current velocity of the agent.\n"
},
{
"name":"angular_velocity",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var angular_velocity: float",
"description":" Current angular velocity of the agent.\n"
},
{
"name":"bounding_radius",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var bounding_radius: float",
"description":" The radius of the sphere that approximates the agent's size in space.\n"
},
{
"name":"is_tagged",
"data_type":"bool",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var is_tagged: bool",
"description":" Used internally by group behaviors and proximities to mark the agent as already\n considered.\n"
}
],
"signals":[
],
"methods":[
],
"static_functions":[
]
},
{
"name":"GSAISteeringBehavior",
"path":"res://src/GSAISteeringBehavior.gd",
"extends_class":[
],
"extends_file":"",
"icon":"",
"signature":"class GSAISteeringBehavior",
"description":" Base class for all steering behaviors.\n\n Steering behaviors calculate the linear and the angular acceleration to be\n to the agent that owns them.\n\n The `calculate_steering` function is the entry point for all behaviors.\n Individual steering behaviors encapsulate the steering logic.\n category: Base types\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"is_enabled",
"data_type":"bool",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var is_enabled: bool",
"description":" If `false`, all calculations return zero amounts of acceleration.\n"
},
{
"name":"agent",
"data_type":"GSAISteeringAgent",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var agent: GSAISteeringAgent",
"description":" The AI agent on which the steering behavior bases its calculations.\n"
"description":" Returns an angle in radians between the positive X axis and the `vector`.\n\n This assumes orientation for 3D agents that are upright and rotate\n around the Y axis.\n",
"description":" Returns a directional vector from the given orientation angle.\n \n This assumes orientation for 2D agents or 3D agents that are upright and\n rotate around the Y axis.\n",
"description":" Determines any agent that is in the specified list as being neighbors with the\n owner agent, regardless of distance.\n category: Proximities\n",
"description":" Returns a number of neighbors based on a `callback` function.\n\n `_find_neighbors` calls `callback` for each agent in the `agents` array and\n adds one to the count if its `callback` returns true.\n tags: virtual\n",
"arguments":[
{
"name":"callback",
"type":"FuncRef"
}
]
}
],
"static_functions":[
]
},
{
"name":"GSAIProximity",
"path":"res://src/Proximities/GSAIProximity.gd",
"extends_class":[
"Reference"
],
"extends_file":"",
"icon":"",
"signature":"class GSAIProximity",
"description":" Base container type that stores data to find the neighbors of an agent.\n category: Proximities\n tags: abstract\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"agent",
"data_type":"GSAISteeringAgent",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var agent: GSAISteeringAgent",
"description":" The owning agent whose neighbors are found in the group\n"
},
{
"name":"agents",
"data_type":"Array",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var agents: Array",
"description":" The agents who are part of this group and could be potential neighbors\n"
"description":" Returns a number of neighbors based on a `callback` function.\n\n `_find_neighbors` calls `callback` for each agent in the `agents` array and\n adds one to the count if its `callback` returns true.\n tags: virtual\n",
"description":" Determines any agent that is in the specified list as being neighbors with the owner agent if\n they lie within the specified radius.\n category: Proximities\n",
"sub_classes":[
],
"constants":[
],
"members":[
{
"name":"radius",
"data_type":"float",
"default_value":null,
"setter":"",
"getter":"",
"export":false,
"signature":"var radius: float",
"description":" The radius around the owning agent to find neighbors in\n"
"description":" Returns a number of neighbors based on a `callback` function.\n\n `_find_neighbors` calls `callback` for each agent in the `agents` array that lie within\n the radius around the owning agent and adds one to the count if its `callback` returns true.\n tags: virtual\n",