public float RespawnCar() { StartCoroutine(RespawnSetKinematic()); StartCoroutine(RespawnSetIsRespawning()); RespawnCheckpoint respawnCheckpoint = GetComponent <Player>().lastRespawnCheckpoint; float yaw = respawnCheckpoint.transform.rotation.eulerAngles.y; transform.DOMove(respawnCheckpoint.transform.position, fallRespawnTime); // transform.DOLocalRotate(new Vector3(0.0f, yaw, 0.0f), fallRespawnTime); transform.DOLocalRotateQuaternion(Quaternion.Euler(0.0f, yaw, 0.0f), fallRespawnTime); return(fallRespawnTime); }
public void PassedRespawnCheckpoint(RespawnCheckpoint checkpoint) { lastRespawnCheckpoint = checkpoint; }
// Start is called before the first frame update void Start() { _respawnCheckpoint = startingRespawn.GetComponent <RespawnCheckpoint>(); }