|
Godot Nature of Code
1.2.0
Nature of Code implemented in Godot Engine
|
Vehicle with force and steering. Tracks a target. More...
Public Member Functions | |
| 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... | |
Public Attributes | |
| 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< SimpleVehicle > | VehicleGroupList |
| 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 | |
| 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... | |
Additional Inherited Members | |
Public Types inherited from Forces.SimpleMover | |
| enum class | WrapModeEnum { Wrap , Bounce , None } |
| Wrapping mode enum. 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... | |
Vehicle with force and steering. Tracks a target.
Definition at line 15 of file SimpleVehicle.cs.
|
inline |
Create a default vehicle.
Definition at line 81 of file SimpleVehicle.cs.
|
inlineprotectedvirtual |
Align with other vehicles.
| vehicles | Other vehicles |
Definition at line 273 of file SimpleVehicle.cs.
|
inlineprotected |
Drive and steer following a flow field.
Definition at line 187 of file SimpleVehicle.cs.
|
inlineprotected |
Drive and steer following a path. Always follow the path from A to B.
Definition at line 205 of file SimpleVehicle.cs.
|
inlineprotectedvirtual |
Move laterally from other vehicles.
| vehicles | Other vehicles |
Definition at line 303 of file SimpleVehicle.cs.
|
inlineprotected |
Regroup with other vehicles.
| vehicles | Other vehicles |
Definition at line 133 of file SimpleVehicle.cs.
|
inlineprotectedvirtual |
Drive and steer towards target position.
| position | Target position |
Definition at line 165 of file SimpleVehicle.cs.
|
inlineprotected |
Separate from other vehicles.
| vehicles | Other vehicles |
Definition at line 101 of file SimpleVehicle.cs.
|
inlineprotectedvirtual |
Update acceleration value.
Reimplemented from Forces.SimpleMover.
Definition at line 335 of file SimpleVehicle.cs.
| bool Agents.SimpleVehicle.AlignmentEnabled |
Enable alignment group behavior
Definition at line 51 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.AlignmentForceFactor = 1 |
Alignment force factor
Definition at line 69 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.ArriveDistance = -1 |
Arrive distance. Use -1 to disable.
Definition at line 30 of file SimpleVehicle.cs.
| bool Agents.SimpleVehicle.CohesionEnabled |
Enable cohesion group behavior
Definition at line 48 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.CohesionForceFactor = 1 |
Cohesion force factor
Definition at line 66 of file SimpleVehicle.cs.
| bool Agents.SimpleVehicle.DebugDraw |
Debug draw
Definition at line 42 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.DetectionAlignmentRadius = 50 |
Detection alignment radius
Definition at line 39 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.DetectionScanLength = 25 |
Detection scan length
Definition at line 33 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.DetectionTargetOffset = 25 |
Detection target offset
Definition at line 36 of file SimpleVehicle.cs.
| bool Agents.SimpleVehicle.LateralMoveEnabled |
Enable lateral move group behavior
Definition at line 54 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.LateralMoveForceFactor = 1 |
Lateral move force factor
Definition at line 72 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.MaxForce = 0.1f |
Max force
Definition at line 27 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.SeekForceFactor = 1 |
Seek force factor
Definition at line 60 of file SimpleVehicle.cs.
| bool Agents.SimpleVehicle.SeparationEnabled |
Enable separation group behavior
Definition at line 45 of file SimpleVehicle.cs.
| float Agents.SimpleVehicle.SeparationForceFactor = 1 |
Separation force factor
Definition at line 63 of file SimpleVehicle.cs.
| SimpleMover Agents.SimpleVehicle.Target |
Target
Definition at line 18 of file SimpleVehicle.cs.
| SimpleFlowField Agents.SimpleVehicle.TargetFlow |
Flow target
Definition at line 21 of file SimpleVehicle.cs.
| SimplePath Agents.SimpleVehicle.TargetPath |
Path target
Definition at line 24 of file SimpleVehicle.cs.
| List<SimpleVehicle> Agents.SimpleVehicle.VehicleGroupList |
Vehicle group list
Definition at line 57 of file SimpleVehicle.cs.