Beispiel #1
0
    public void ActivateCamera(ParcelScene parcelScene)
    {
        freeCameraController.gameObject.SetActive(true);
        SetLookAtObject(parcelScene);

        // NOTE(Adrian): Take into account that right now to get the relative scale of the gizmos, we set the gizmos in the player position and the camera
        Vector3 cameraPosition = DCLCharacterController.i.characterPosition.unityPosition;

        freeCameraController.SetPosition(cameraPosition + Vector3.up * distanceEagleCamera);
        //

        freeCameraController.LookAt(lookAtT);

        cameraController.SetCameraMode(CameraMode.ModeId.BuildingToolGodMode);

        gizmoManager.InitializeGizmos(Camera.main, freeCameraController.transform);
        gizmoManager.ForceRelativeScaleRatio();
    }
    public void ActivateCamera(ParcelScene parcelScene)
    {
        freeCameraController.gameObject.SetActive(true);
        SetLookAtObject(parcelScene);

        Vector3 cameraPosition = GetInitialCameraPosition(parcelScene);

        freeCameraController.SetPosition(cameraPosition);
        freeCameraController.LookAt(lookAtT);
        freeCameraController.SetResetConfiguration(cameraPosition, lookAtT);

        if (cameraController.currentCameraState.cameraModeId != CameraMode.ModeId.BuildingToolGodMode)
        {
            avatarCameraModeBeforeEditing = cameraController.currentCameraState.cameraModeId;
        }

        cameraController.SetCameraMode(CameraMode.ModeId.BuildingToolGodMode);
    }