void FadeToGhostMode() { ChangeToState(State.FadingToGhostMode); ghostAvatar.FadeIn(); Singletons.timeManager.WarpTimeIn(onComplete: OnTimeWarpedIn); }
void FadeToGhostMode() { if (controlMode == ControlMode.ThirdPerson) { //*** Place camera behind the avatar, so we can see him turning in place { Vector3 horizViewDirection = playerHead.lookDirection; horizViewDirection.y = 0; horizViewDirection.Normalize(); transform.position = transform.position - 1.5f * horizViewDirection + 0.0f * Vector3.up; } } else if (controlMode == ControlMode.StepTeleport) { ghostAvatar.FadeIn(); } ChangeToState(State.FadingToGhostMode); Singletons.timeManager.WarpTimeIn(onComplete: OnTimeWarpedIn); }