コード例 #1
0
    public void PlaceCharacter(int tutPhase, int gate)
    {
        if (preloader.useOVR)
        {
            gate = 0;
        }

        envManager = gameManagers.GetComponent <EnvironmentManager>();
        SBSVector3 pos, tang;

        envManager.GetAvailableStartPosition(tutPhase, gate, out pos, out tang);
        transform.position = pos + (SBSVector3.up * 0.01f);
        transform.LookAt(pos + tang * 10.0f);
        placed = true;

        cameraObj.SendMessage("SetupCamera", gameObject, SendMessageOptions.DontRequireReceiver);

        /*  if (CameraController != null)
         * {
         *    CameraController.SetOrientationOffset(transform.rotation);
         *    CameraController.SetYRotation(0.0f);
         * }*/

        lastPosition = transform.position;
    }