Class CameraMouseDrag
Camera that can be dragged with the mouse. Supports Forza-style dynamics.
Inheritance
CameraMouseDrag
Assembly: NWH.Common.dll
Syntax
public class CameraMouseDrag : VehicleCamera
Fields
|
Edit this page
View Source
allowPanning
Declaration
[Tooltip("Can the camera be panned by the user?")]
public bool allowPanning
Field Value
|
Edit this page
View Source
allowRotation
Declaration
[Tooltip("Can the camera be rotated by the user?")]
public bool allowRotation
Field Value
|
Edit this page
View Source
autoCenterDelay
Declaration
[Range(0, 5)]
[Tooltip("Seconds of no rotation input before auto-centering starts.")]
public float autoCenterDelay
Field Value
|
Edit this page
View Source
autoCenterMinSpeed
Declaration
[Range(0, 10)]
[Tooltip("Minimum vehicle speed (m/s) required for auto-centering. Prevents centering when stationary.")]
public float autoCenterMinSpeed
Field Value
|
Edit this page
View Source
autoCenterSpeed
Declaration
[Range(0.5, 10)]
[Tooltip("Speed at which camera returns to center. Higher = faster.")]
public float autoCenterSpeed
Field Value
|
Edit this page
View Source
baseFOV
Declaration
[Range(30, 90)]
[Tooltip("Field of view when stationary.")]
public float baseFOV
Field Value
|
Edit this page
View Source
distance
Declaration
[Range(0, 100)]
[Tooltip("Base distance from target at which camera will be positioned.")]
public float distance
Field Value
|
Edit this page
View Source
followTargetPitchAndYaw
Declaration
[FormerlySerializedAs("followTargetsRotation")]
[Tooltip("If true the camera will rotate with the vehicle along the X and Y axis.")]
public bool followTargetPitchAndYaw
Field Value
|
Edit this page
View Source
followTargetRoll
Declaration
[Tooltip("If true the camera will rotate with the vehicle along the Z axis.")]
public bool followTargetRoll
Field Value
|
Edit this page
View Source
fovSmoothing
Declaration
[Range(0, 1)]
[Tooltip("Smoothing applied to FOV transitions.")]
public float fovSmoothing
Field Value
|
Edit this page
View Source
fovSpeedRange
Declaration
[Range(10, 200)]
[Tooltip("Speed (m/s) at which maximum FOV is reached.")]
public float fovSpeedRange
Field Value
|
Edit this page
View Source
initXRotation
Declaration
[Tooltip("Initial rotation around the X axis (up/down)")]
public float initXRotation
Field Value
|
Edit this page
View Source
initYRotation
Declaration
[Tooltip("Initial rotation around the Y axis (left/right)")]
public float initYRotation
Field Value
|
Edit this page
View Source
lookAheadIntensity
Declaration
[Range(0, 30)]
[Tooltip("Maximum degrees of yaw offset when turning.")]
public float lookAheadIntensity
Field Value
|
Edit this page
View Source
lookAheadSmoothing
Declaration
[Range(0, 1)]
[Tooltip("Smoothing applied to look-ahead. Higher = slower response.")]
public float lookAheadSmoothing
Field Value
|
Edit this page
View Source
maxDistance
Declaration
[Range(0, 100)]
[Tooltip("Maximum distance that will be reached when zooming out.")]
public float maxDistance
Field Value
|
Edit this page
View Source
maxFOV
Declaration
[Range(30, 120)]
[Tooltip("Maximum field of view at high speed.")]
public float maxFOV
Field Value
|
Edit this page
View Source
maxSpeedDistance
Declaration
[Range(0, 10)]
[Tooltip("Maximum additional distance from speed.")]
public float maxSpeedDistance
Field Value
|
Edit this page
View Source
maxSpeedHeight
Declaration
[Range(0, 5)]
[Tooltip("Maximum additional height from speed.")]
public float maxSpeedHeight
Field Value
|
Edit this page
View Source
minDistance
Declaration
[Range(0, 100)]
[Tooltip("Minimum distance that will be reached when zooming in.")]
public float minDistance
Field Value
|
Edit this page
View Source
panningSensitivity
Declaration
[Tooltip("Sensitivity of panning input.")]
public Vector2 panningSensitivity
Field Value
|
Edit this page
View Source
povType
Declaration
[Tooltip("Camera POV type. First person camera will invert controls.\r\nZoom is not available in 1st person.")]
public CameraMouseDrag.POVType povType
Field Value
|
Edit this page
View Source
rotationSensitivity
Declaration
[Tooltip("Sensitivity of rotation input.")]
public Vector2 rotationSensitivity
Field Value
|
Edit this page
View Source
rotationSmoothing
Declaration
[Range(0, 1)]
[Tooltip("Smoothing of the camera rotation.")]
public float rotationSmoothing
Field Value
|
Edit this page
View Source
shakeAxisIntensity
Declaration
[Tooltip("Movement intensity per axis. Set to 0 to disable movement on that axis or negative to reverse it.")]
public Vector3 shakeAxisIntensity
Field Value
|
Edit this page
View Source
shakeIntensity
Declaration
[Range(0, 1)]
[Tooltip("How much will the head move around for the given g-force.")]
public float shakeIntensity
Field Value
|
Edit this page
View Source
shakeMaxOffset
Declaration
[Range(0, 1)]
[Tooltip("Maximum head movement from the initial position.")]
public float shakeMaxOffset
Field Value
|
Edit this page
View Source
shakeSmoothing
Declaration
[Range(0, 1)]
[Tooltip("Smoothing of the head movement.")]
public float shakeSmoothing
Field Value
|
Edit this page
View Source
speedDistanceMultiplier
Declaration
[Range(0, 0.2)]
[Tooltip("Extra distance added per m/s of speed.")]
public float speedDistanceMultiplier
Field Value
|
Edit this page
View Source
speedHeightMultiplier
Declaration
[Range(0, 0.1)]
[Tooltip("Extra height added per m/s of speed.")]
public float speedHeightMultiplier
Field Value
|
Edit this page
View Source
targetPositionOffset
Declaration
[Tooltip("Look position offset from the target center.")]
public Vector3 targetPositionOffset
Field Value
|
Edit this page
View Source
useAutoCenter
Declaration
[Tooltip("Camera gradually returns behind vehicle after manual rotation stops.")]
public bool useAutoCenter
Field Value
|
Edit this page
View Source
useLookAhead
Declaration
[Tooltip("Camera anticipates turns by rotating into the direction of steering.")]
public bool useLookAhead
Field Value
|
Edit this page
View Source
useShake
Declaration
[Tooltip("Should camera movement on acceleration be used?")]
public bool useShake
Field Value
|
Edit this page
View Source
useSpeedDistance
Declaration
[Tooltip("Camera pulls back at higher speeds.")]
public bool useSpeedDistance
Field Value
|
Edit this page
View Source
useSpeedFOV
Declaration
[Tooltip("Dynamically adjust FOV based on vehicle speed.")]
public bool useSpeedFOV
Field Value
|
Edit this page
View Source
useSpeedHeight
Declaration
[Tooltip("Camera rises at higher speeds.")]
public bool useSpeedHeight
Field Value
|
Edit this page
View Source
verticalMaxAngle
Declaration
[Range(-90, 90)]
[Tooltip("Maximum vertical angle the camera can achieve.")]
public float verticalMaxAngle
Field Value
|
Edit this page
View Source
verticalMinAngle
Declaration
[Range(-90, 90)]
[Tooltip("Minimum vertical angle the camera can achieve.")]
public float verticalMinAngle
Field Value
|
Edit this page
View Source
zoomSensitivity
Declaration
[Range(0, 15)]
[Tooltip("Sensitivity of the middle mouse button / wheel.")]
public float zoomSensitivity
Field Value
Methods
|
Edit this page
View Source
ClampAngle(float, float, float)
Declaration
public float ClampAngle(float angle, float min, float max)
Parameters
Returns
|
Edit this page
View Source
OnDrawGizmosSelected()
Declaration
public void OnDrawGizmosSelected()