logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityCameraShakeApplier

    Applies the screen-shake offset to a camera in a way that survives a camera controller. A follow / gameplay camera sets its own position every frame, which would overwrite a shake written earlier in the frame. This component runs with a very late execution order (after typical controllers) and, each LateUpdate, removes its previous offset (so the controller's value becomes the base) then re-applies the current offset additively. That makes shake work whether or not a controller drives the camera, and never drifts.

    The screen-shake channel adds this automatically to the camera it shakes and feeds it the offset.

    Inheritance
    object
    UnityCameraShakeApplier
    Namespace: Serenity.Feedback.Infrastructure.Components
    Assembly: Serenity.UnityFeedback.Infrastructure.dll
    Syntax
    public sealed class UnityCameraShakeApplier : MonoBehaviour

    Constructors

    UnityCameraShakeApplier()

    Declaration
    public UnityCameraShakeApplier()

    Methods

    SetOffset(Vector3)

    Sets the shake offset to apply (local space). Zero to stop shaking.

    Declaration
    public void SetOffset(Vector3 offset)
    Parameters
    Type Name Description
    Vector3 offset
    In this article
    © 2026 Serenity. All Rights Reserved