Death Animation Fall thru (need help!)

hi!

here there is my animation for Dying.

I was wondering how to disable Main camera after diyng.
I had an idea but doesn’t work,

thanks for the help!
Castelvania-test1-WindowsMacLinux-Unity2022.3.16f1_DX11_2024-02-0709-12-53-Trim-ezgif.com-video-to-gif-converter
CODE:

void Die()

{

    if (myBodyCollider.IsTouchingLayers(LayerMask.GetMask("Enemies")))

    {

        isAlive = false;

        myAnimator.SetTrigger("Dying");

        myBodyCollider.enabled = !myBodyCollider.enabled;

        myFeetCollider.enabled = !myFeetCollider.enabled;

        myrigidBody.velocity += new Vector2 (5f,8f);

   

    }

}

Here’s my death camera. Note that it doesn’t have a follow target, and under transitions I have selected inherit position so it doesn’t jump back to the start of the level.
image

On my state driven camera, I add in the Death camera blends
image

The result
TileVania Death

Privacy & Terms