MF_AbstractMobility
Base class for mobility scripts. And also provides a common point of reference for certain variables used by other scripts.
Public Variables
navTarget : Transform
This is the target the mobility script will attempt to reach.
useIntercept : bool
If true, will try to compute an intercept angle to navTarget. If no valid intercept is found, it will simply head towards the navTarget position.
interceptForPlatform : MF_AbstractPlatform
If useIntercept is true, it will maneuver to intercept with a weapon. Designate the weapon platform to use. This weapon platform must also have a target and use intercept, as it uses the intercept calculation already performed by the platform. This is useful to aim fixed guns.
Hidden Variables
throttle : float
The current throttle setting. Typically between 0-1
monitor : float
Can be read by MF_FxController. Typically used by classes that inherit this as a throttle setting.
navTargetAim : Vector3
The position of navTarget intercept point.
myRigidbody : Rigidbody
The rigidbody, if any, of the vehicle.
velocity : Vector3
The stored velocity of the unit.
fxScript : List <MF_FxController>
A list of fx scripts that have added themselves for referencing. Used so a component script can tell the various fx scripts when a value has changed, and when all fx are finished.
Public Methods
UnitVelocity : Vector3 ( )
Returns the velocity of the unit. A rigidbody is not necessary, but highly recommended.
ModifiedPosition : Vector3 ( pos : Vector3 )
Returns the same Vector3. However, individual mobility scripts may override this to allow a positional modification of the navTarget position. For example, a wheeled vehicle may not be able to reach a location in the air, so the position would be modified to the height of the vehicle.
Base class for mobility scripts. And also provides a common point of reference for certain variables used by other scripts.
Public Variables
navTarget : Transform
This is the target the mobility script will attempt to reach.
useIntercept : bool
If true, will try to compute an intercept angle to navTarget. If no valid intercept is found, it will simply head towards the navTarget position.
interceptForPlatform : MF_AbstractPlatform
If useIntercept is true, it will maneuver to intercept with a weapon. Designate the weapon platform to use. This weapon platform must also have a target and use intercept, as it uses the intercept calculation already performed by the platform. This is useful to aim fixed guns.
Hidden Variables
throttle : float
The current throttle setting. Typically between 0-1
monitor : float
Can be read by MF_FxController. Typically used by classes that inherit this as a throttle setting.
navTargetAim : Vector3
The position of navTarget intercept point.
myRigidbody : Rigidbody
The rigidbody, if any, of the vehicle.
velocity : Vector3
The stored velocity of the unit.
fxScript : List <MF_FxController>
A list of fx scripts that have added themselves for referencing. Used so a component script can tell the various fx scripts when a value has changed, and when all fx are finished.
Public Methods
UnitVelocity : Vector3 ( )
Returns the velocity of the unit. A rigidbody is not necessary, but highly recommended.
ModifiedPosition : Vector3 ( pos : Vector3 )
Returns the same Vector3. However, individual mobility scripts may override this to allow a positional modification of the navTarget position. For example, a wheeled vehicle may not be able to reach a location in the air, so the position would be modified to the height of the vehicle.