Answer the question
In order to leave comments, you need to log in
How to make a small blackout at death?
I am creating a mini-game, I made a code so that when I fall into the abyss, I return to the respawn point. How can you add a slight darkening of the screen during, so to speak, death in the abyss, so that the transition is not very sharp. Here is the script:
using UnityEngine;
using System.Collections;
public class died : MonoBehaviour
{
[SerializeField] private Transform player;
[SerializeField] private Transform respawnPoint;
void OnTriggerEnter(Collider other)
{
player.transform.position = respawnPoint.transform.position;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question