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
Inherited Members
Namespace: Cinemachine
Syntax
[DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
[AddComponentMenu("")]
public class CinemachineBasicMultiChannelPerlin : CinemachineComponentBase
Fields
m_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.")]
public float m_AmplitudeGain
Field Value
Type | Description |
---|---|
Single |
m_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.")]
public float m_FrequencyGain
Field Value
Type | Description |
---|---|
Single |
m_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")]
public NoiseSettings m_NoiseProfile
Field Value
Type | Description |
---|---|
NoiseSettings |
m_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)")]
public Vector3 m_PivotOffset
Field Value
Type | Description |
---|---|
Vector3 |
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 |
---|---|
Boolean |
Overrides
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
Methods
MutateCameraState(ref CameraState, Single)
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 |
Single | deltaTime | How much to advance the perlin noise generator. Noise is only applied if this value is greater than or equal to 0 |
Overrides
ReSeed()
Generate a new random seed
Declaration
public void ReSeed()