Vehicle:
Filter:
GameLoop/Classes (extension) | Class

Vehicle
ExtensionExtension

An entity that can steer itself or be steered.

Description

Vehicle includes all the variables required for implementing steering behaviours.

Class Methods

.new

Create a new mobile entity

Arguments:

world

an instance of EntityManager

position

an instance of RealVector2D

radius

radius in meters

mass

a number/float

collisionType

a symbol for the collision type /free, /mobile or /static

velocity

an instance of RealVector2D

maxSpeed

the max possible speed of the vehicle

maxForce

the max possible force that can be applied to the vehicle

heading

the current heading. At the moment is identical to the velocity

side

a vector perpedicular to the heading

maxTurnRate

- not used at the moment -