Godot Nature of Code  1.2.0
Nature of Code implemented in Godot Engine
Public Member Functions | List of all members
Agents.RoundVehicle Class Reference

Vehicle with a round shape. More...

Inheritance diagram for Agents.RoundVehicle:
Agents.SimpleVehicle Forces.SimpleMover

Public Member Functions

 RoundVehicle ()
 Create a default round vehicle. More...
 
- Public Member Functions inherited from Agents.SimpleVehicle
 SimpleVehicle ()
 Create a default vehicle. More...
 
- Public Member Functions inherited from Forces.SimpleMover
 SimpleMover ()
 Create a simple wrapping mover with a circle mesh. More...
 
 SimpleMover (WrapModeEnum wrapMode)
 Create a simple mover with a custom wrap mode and a circle mesh. More...
 
virtual void ApplyForce (Vector2 force)
 Apply force on mover. More...
 
virtual void ApplyAngularForce (float force)
 Apply angular force on mover. More...
 
virtual void ApplyFriction (float coef)
 Apply friction on mover. More...
 
virtual void ApplyAngularFriction (float coef)
 Apply angular friction on mover. More...
 
virtual void ApplyDrag (float coef)
 Apply drag on mover. More...
 
virtual void ApplyDamping (float coef)
 Apply damping on mover. More...
 

Additional Inherited Members

- Public Types inherited from Forces.SimpleMover
enum class  WrapModeEnum { Wrap , Bounce , None }
 Wrapping mode enum. More...
 
- Public Attributes inherited from Agents.SimpleVehicle
SimpleMover Target
 Target More...
 
SimpleFlowField TargetFlow
 Flow target More...
 
SimplePath TargetPath
 Path target More...
 
float MaxForce = 0.1f
 Max force More...
 
float ArriveDistance = -1
 Arrive distance. Use -1 to disable. More...
 
float DetectionScanLength = 25
 Detection scan length More...
 
float DetectionTargetOffset = 25
 Detection target offset More...
 
float DetectionAlignmentRadius = 50
 Detection alignment radius More...
 
bool DebugDraw
 Debug draw More...
 
bool SeparationEnabled
 Enable separation group behavior More...
 
bool CohesionEnabled
 Enable cohesion group behavior More...
 
bool AlignmentEnabled
 Enable alignment group behavior More...
 
bool LateralMoveEnabled
 Enable lateral move group behavior More...
 
List< SimpleVehicleVehicleGroupList
 Vehicle group list More...
 
float SeekForceFactor = 1
 Seek force factor More...
 
float SeparationForceFactor = 1
 Separation force factor More...
 
float CohesionForceFactor = 1
 Cohesion force factor More...
 
float AlignmentForceFactor = 1
 Alignment force factor More...
 
float LateralMoveForceFactor = 1
 Lateral move force factor More...
 
- Public Attributes inherited from Forces.SimpleMover
Vector2 Velocity = Vector2.Zero
 Current velocity More...
 
Vector2 Acceleration = Vector2.Zero
 Current acceleration More...
 
float AngularVelocity
 Current angular velocity More...
 
float AngularAcceleration
 Current angular acceleration More...
 
float MaxVelocity = 10
 Max velocity More...
 
float MaxAngularVelocity = 0.1f
 Max angular velocity More...
 
float Mass = 1
 Mass More...
 
WrapModeEnum WrapMode
 Wrapping mode More...
 
bool DisableForces
 Disable forces More...
 
bool SyncRotationOnVelocity
 Synchronize rotation on velocity More...
 
SimpleMesh Mesh
 Mesh More...
 
- Protected Member Functions inherited from Agents.SimpleVehicle
Vector2 Separate (List< SimpleVehicle > vehicles)
 Separate from other vehicles. More...
 
Vector2 Regroup (List< SimpleVehicle > vehicles)
 Regroup with other vehicles. More...
 
virtual Vector2 Seek (Vector2 position)
 Drive and steer towards target position. More...
 
Vector2 FollowFlow ()
 Drive and steer following a flow field. More...
 
Vector2 FollowPath ()
 Drive and steer following a path. Always follow the path from A to B. More...
 
virtual Vector2 Align (List< SimpleVehicle > vehicles)
 Align with other vehicles. More...
 
virtual Vector2 MoveLaterally (List< SimpleVehicle > vehicles)
 Move laterally from other vehicles. More...
 
override void UpdateAcceleration ()
 Update acceleration value. More...
 
- Protected Attributes inherited from Forces.SimpleMover
CollisionShape2D collisionShape2D
 Collision shape More...
 
- Properties inherited from Forces.SimpleMover
bool Drawing [get, set]
 Draw mesh More...
 
Vector2 MeshSize [get, set]
 Mesh size More...
 
float Radius [get, set]
 Mesh radius More...
 

Detailed Description

Vehicle with a round shape.

Definition at line 9 of file RoundVehicle.cs.

Constructor & Destructor Documentation

◆ RoundVehicle()

Agents.RoundVehicle.RoundVehicle ( )
inline

Create a default round vehicle.

Definition at line 14 of file RoundVehicle.cs.

15  {
17  Mesh.MeshSize = new Vector2(10, 10);
18  }
Simple "mesh" drawing. Can be a circle, square, custom drawing or custom texture.
Definition: SimpleMesh.cs:9
TypeEnum MeshType
Mesh type
Definition: SimpleMesh.cs:35
Vector2 MeshSize
Mesh size
Definition: SimpleMesh.cs:32
TypeEnum
Mesh type enum value.
Definition: SimpleMesh.cs:14
SimpleMesh Mesh
Mesh
Definition: SimpleMover.cs:57

The documentation for this class was generated from the following file: