Class SailRotator
Rotates a transform based on player input from the AdvancedShipController. Used to control sail orientation in response to the RotateSail input axis. Typically attached to a sail boom or mast that rotates horizontally. Requires an AdvancedShipController component on a parent GameObject.
Namespace: NWH.DWP2.SailController
Assembly: NWH.DWP2.dll
Syntax
public class SailRotator : MonoBehaviour
Fields
| Edit this page View SourcerotationAxis
Local axis around which the transform rotates. Default (0, 1, 0) rotates around the Y-axis. Use negative values to reverse rotation direction. Magnitude is ignored - only direction matters.
Declaration
[Tooltip("Rotation axis of this transform.\r\nUse -1 to reverse the rotation.")]
public Vector3 rotationAxis
Field Value
| Type | Description |
|---|---|
| Vector3 |
rotationSpeed
Maximum rotation speed in degrees per second when input is at full deflection. Higher values allow faster sail adjustment. Combined with rotationAxis and player input to determine final rotation.
Declaration
[Tooltip("Rotation speed of this transform in deg/s.\r\nMultiplied by the rotationAxis to get the final rotation.")]
public float rotationSpeed
Field Value
| Type | Description |
|---|---|
| float |