Ejemplo n.º 1
0
 public StoryPathCamera(IStoryPath storyPath, CameraProps initialCameraProps, CameraProps?finalCameraProps, Action onComplete)
 {
     this.storyPath          = storyPath;
     this.initialCameraProps = initialCameraProps;
     this.finalCameraProps   = finalCameraProps;
     this.onComplete         = onComplete;
     time = 0f;
 }
Ejemplo n.º 2
0
        public void NavigateTo(ISceneNode node, IStoryPath storyPath, CameraProps initialCameraProps, float?initialFloorHeight, float?targetFloorHeight)
        {
            var cFocusNode = node.GetComponent <IFocusNodeComponent>();
            var newCamera  = cFocusNode.DefaultViewpointMechanism.CreateControlledViewpoint();

            if (initialFloorHeight.HasValue)
            {
                initialCameraProps.Frame.Eye.Y = initialFloorHeight.Value + 2;
            }
            currentPathCamera = new StoryPathCamera(storyPath, initialCameraProps, newCamera.GetProps(), () => hasFinished = true);
            floorHeightOffset = initialFloorHeight.HasValue
                ? 2//initialCameraProps.Frame.Eye.Y - floorHeight.Value
                : 0;
            hasFinished = false;
        }
 public void NavigateTo(ISceneNode node, IStoryPath storyPath, CameraProps initialCameraProps, float?initialFloorHeight, float?targetFloorHeight)
 {
     TeleportTo(globalObjectService.VrPlayerCarrier, node, targetFloorHeight);
 }