Class Thruster
Lateral thruster for sideways ship movement.
Bow thrusters are mounted at the front for tight turning and docking, stern thrusters at the rear.
Multiple thrusters of each type can be added for increased lateral control.
Assembly: NWH.DWP2.dll
Syntax
[Serializable]
public class Thruster
Fields
|
Edit this page
View Source
maxThrust
Maximum thrust force in Newtons.
Declaration
[Tooltip("Max thrust in [N].")]
public float maxThrust
Field Value
|
Edit this page
View Source
name
Display name for this thruster.
Declaration
[Tooltip("Name of the thruster - can be any string.")]
public string name
Field Value
|
Edit this page
View Source
position
Position relative to ship transform where thrust force is applied.
Declaration
[Tooltip("Relative force application position.")]
public Vector3 position
Field Value
|
Edit this page
View Source
propellerRotationDirection
Declaration
[FormerlySerializedAs("rotationDirection")]
[Tooltip("Rotation direction of the propeller. Visual only.")]
public Thruster.RotationDirection propellerRotationDirection
Field Value
|
Edit this page
View Source
propellerRotationSpeed
Declaration
[Tooltip("Rotation speed of the propeller if assigned. Visual only.")]
public float propellerRotationSpeed
Field Value
|
Edit this page
View Source
Declaration
[Tooltip("Optional. Transform representing a propeller. Visual only.")]
public Transform propellerTransform
Field Value
|
Edit this page
View Source
spinUpSpeed
Declaration
[Tooltip("Time needed to reach maxThrust.")]
public float spinUpSpeed
Field Value
|
Edit this page
View Source
thrusterPosition
Whether this is a bow or stern thruster.
Declaration
public Thruster.ThrusterPosition thrusterPosition
Field Value
Properties
|
Edit this page
View Source
Current input value for this thruster from -1 to 1.
Automatically retrieves from the appropriate input channel based on thrusterPosition.
Declaration
public float Input { get; }
Property Value
|
Edit this page
View Source
IsInitialized
Returns true if the thruster has been initialized with a parent ship controller.
Declaration
public bool IsInitialized { get; }
Property Value
|
Edit this page
View Source
WorldPosition
World space position where thrust force is applied.
Declaration
public Vector3 WorldPosition { get; }
Property Value
Methods
|
Edit this page
View Source
Initialize(AdvancedShipController)
Initializes the thruster with a reference to its parent ship controller.
Declaration
public void Initialize(AdvancedShipController sc)
Parameters
|
Edit this page
View Source
Update()
Declaration
public virtual void Update()