Class CinemachineBasicMultiChannelPerlin
As a part of the Cinemachine Pipeline implementing the Noise stage, this component adds Perlin Noise to the Camera state, in the Correction channel of the CameraState.
The noise is created by using a predefined noise profile asset. This defines the shape of the noise over time. You can scale this in amplitude or in time, to produce a large family of different noises using the same profile.
Inheritance
Implements
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[AddComponentMenu("Cinemachine/Procedural/Noise/Cinemachine Basic Multi Channel Perlin")]
[DisallowMultipleComponent]
[CameraPipeline(CinemachineCore.Stage.Noise)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineBasicMultiChannelPerlin.html")]
public class CinemachineBasicMultiChannelPerlin : CinemachineComponentBase, CinemachineFreeLookModifier.IModifiableNoise
Fields
AmplitudeGain
Gain to apply to the amplitudes defined in the settings asset.
Declaration
[Tooltip("Gain to apply to the amplitudes defined in the NoiseSettings asset. 1 is normal. Setting this to 0 completely mutes the noise.")]
[FormerlySerializedAs("m_AmplitudeGain")]
public float AmplitudeGain
Field Value
Type | Description |
---|---|
float |
See Also
FrequencyGain
Scale factor to apply to the frequencies defined in the settings asset.
Declaration
[Tooltip("Scale factor to apply to the frequencies defined in the NoiseSettings asset. 1 is normal. Larger magnitudes will make the noise shake more rapidly.")]
[FormerlySerializedAs("m_FrequencyGain")]
public float FrequencyGain
Field Value
Type | Description |
---|---|
float |
See Also
NoiseProfile
Serialized property for referencing a NoiseSettings asset
Declaration
[Tooltip("The asset containing the Noise Profile. Define the frequencies and amplitudes there to make a characteristic noise profile. Make your own or just use one of the many presets.")]
[FormerlySerializedAs("m_Definition")]
[FormerlySerializedAs("m_NoiseProfile")]
public NoiseSettings NoiseProfile
Field Value
Type | Description |
---|---|
NoiseSettings |
See Also
PivotOffset
When rotating the camera, offset the camera's pivot position by this much (camera space)
Declaration
[Tooltip("When rotating the camera, offset the camera's pivot position by this much (camera space)")]
[FormerlySerializedAs("m_PivotOffset")]
public Vector3 PivotOffset
Field Value
Type | Description |
---|---|
Vector3 |
See Also
Properties
IsValid
True if the component is valid, i.e. it has a noise definition and is enabled.
Declaration
public override bool IsValid { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
See Also
Stage
Get the Cinemachine Pipeline stage that this component implements. Always returns the Noise stage
Declaration
public override CinemachineCore.Stage Stage { get; }
Property Value
Type | Description |
---|---|
CinemachineCore.Stage |
Overrides
See Also
Methods
MutateCameraState(ref CameraState, float)
Applies noise to the Correction channel of the CameraState if the delta time is greater than 0. Otherwise, does nothing.
Declaration
public override void MutateCameraState(ref CameraState curState, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
CameraState | curState | The current camera state |
float | deltaTime | How much to advance the perlin noise generator. Noise is only applied if this value is greater than or equal to 0 |
Overrides
See Also
ReSeed()
Generate a new random seed
Declaration
public void ReSeed()