Vixen
02b45cc4
csharp
public struct CameraNoise

The wobble of a camera somebody is holding.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Six channels of noise — three of displacement, three of rotation — sampled against the clock rather than integrated frame by frame, so the shake is a function of time and two machines running the same second of game produce the same picture.

It is applied after damping and never fed back into it. The shake lives in ShakePosition and ShakeRotation, apart from the position the body stage damped, because a damped camera that could see its own shake would chase it — the noise would become an input to the smoothing that is supposed to be underneath it, and the result reads as a camera with a loose mounting rather than a hand-held one.

The amplitudes are bounds, not estimates. CameraNoiseSignal is value noise, whose range is exactly ±1, so a shake declared as five centimetres never exceeds five centimetres — which is what makes it safe to put a camera this close to a wall.

Fields and properties (8)

  • public Vector3 PositionAmplitude

    How far the camera may be displaced on each camera-space axis, in world units.

  • public Vector3 PositionFrequency

    How quickly each displacement channel varies, in cycles per second.

  • public Vector3 RotationAmplitude

    How far the camera may be turned about each of its own axes, in radians.

  • public Vector3 RotationFrequency

    How quickly each rotation channel varies, in cycles per second.

  • public float Gain

    A multiplier over everything above.

  • public int Seed

    Which noise this camera gets.

  • public bool Unscaled

    Whether the shake keeps moving while the game is paused or slowed.

  • public static CameraNoise Handheld

    A quiet handheld shake: a centimetre or two, half a degree, at a few hertz.

Used by (7)

  • CameraDirectorTestsVixen.Engine.Tests
  • ComponentRegistrationVixen.Engine
  • TypeRegistrationVixen.Engine
  • VirtualCameraSystemVixen.Engine
  • VirtualCameraTestsVixen.Engine.Tests
  • Vixen_Engine_Cameras_CameraNoiseSerializerVixen.Engine
  • MaterialIconsVixen.Editor.App