Class CinemachineImpulseSource | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class CinemachineImpulseSource

    An event-driven class that broadcasts an impulse signal to listeners.

    This is the base class for custom impulse sources. It contains an impulse definition, where the characteristics of the impulse signal are defined.

    API methods are fined for actually broadcasting the impulse. Call these methods from your custom code, or hook them up to game events in the Editor.

    Inheritance
    System.Object
    CinemachineImpulseSource
    CinemachineCollisionImpulseSource
    Namespace: Cinemachine
    Syntax
    [DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
    public class CinemachineImpulseSource : MonoBehaviour

    Fields

    m_ImpulseDefinition

    This defines the complete impulse signal that will be broadcast.

    Declaration
    public CinemachineImpulseDefinition m_ImpulseDefinition
    Field Value
    Type Description
    CinemachineImpulseDefinition

    Methods

    GenerateImpulse()

    Broadcast the Impulse Signal onto the appropriate channels, with default velocity = (0, -1, 0), and a default position which is this transform's location.

    Declaration
    public void GenerateImpulse()

    GenerateImpulse(Vector3)

    Broadcast the Impulse Signal onto the appropriate channels, using a custom impact velocity, and this transfom's position.

    Declaration
    public void GenerateImpulse(Vector3 velocity)
    Parameters
    Type Name Description
    Vector3 velocity

    The impact magnitude and direction

    GenerateImpulseAt(Vector3, Vector3)

    Broadcast the Impulse Signal onto the appropriate channels, using a custom position and impact velocity

    Declaration
    public void GenerateImpulseAt(Vector3 position, Vector3 velocity)
    Parameters
    Type Name Description
    Vector3 position

    The world-space position from which the impulse will emanate

    Vector3 velocity

    The impact magnitude and direction

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023