⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    KinematicHingeDoor MonoBehaviour

    Overview

    The KinematicHingeDoor behaviour handles opening, closing and animating a basic hinge door. The door rotates around 2 points depending on which direction it opens to prevent the door object overlapping with its frame.

    Inspector

    KinematicHingeDoor

    Properties

    Name Type Description
    Occlusion Portal OcclusionPortal An optional occlusion portal component for the doorway. This will be synced to the door opening and closing so that it occludes objects when closed.
    Max Angle Float The maximum open angle of the door.
    Open Duration Float The time it takes to go from fully closed to fully open and vice versa.
    Open Curve AnimationCurve The interpolation curve for opening and closing the door.
    Positive Rotation Transform Transform The transform point for the positive rotation of the door (defaults to the transform for the object this behaviour is attached to).
    Negative Rotation Transform Transform The transform point for the negative rotation of the door. This allows hinges at both edges of a door to prevent overlap. If this is null the door will only open on one side.
    Direction Transform Transform A fixed transform used to check which side of the doorway a character is on (defaults to the transform for the object this behaviour is attached to).
    Handle AnimatedDoorHandle An optional animated door handle. This will turn and release when the door is opened.
    Audio Unlatch AudioClip The audio to play when the door unlatches and starts opening.
    Audio Latch AudioClip The audio to play when the door latches closed.
    Audio Move AudioClip The audio to play when the starts moving.
    Audio Locked AudioClip The audio to play when attempting to open the door while locked.
    Audio Unlock Or Lock AudioClip The audio to play when unlocking or locking the door.
    On Open UnityEvent An event fired when the door unlatches and starts opening.
    On Closed UnityEvent An event fired when the door is finished closing and latches.
    On Try Open Locked UnityEvent An event fired when attempting to open the door while locked.

    See Also

    Doors

    AnimatedDoorHandle

    Unity AnimationCurve

    Back to top Copyright © 2019 Yondernauts Game Studios Ltd
    Generated with DocFX