Beispiel #1
0
        public void updateLastStep()
        {
            Vector2 deltaTilt = inputHandler.getDeltaTiltFromMouselook();

            leftRightRot += deltaTilt.X;
            upDownRot    += deltaTilt.Y;

            limitUpDownRot();

            oldKeyboardState = currentKeyboardState;
            oldMouseState    = currentMouseState;

            if (galleryMode)
            {
                float distanceFromIslandCenter = ChunkSpace.chunkWidth * ChunkSpace.widthInChunksStaticForGallery * .9f;
                float islandWidth = ChunkSpace.chunkWidth * ChunkSpace.widthInChunksStaticForGallery;
                smoothCam = new PlayerCam(
                    new Vector3((float)Math.Cos(age / 40.0),
                                ((float)Math.Cos(age / 100.0 + 10.0) + 1.0f) / 4f
                                + .1f,
                                (float)Math.Sin(age / 40.0)) *
                    distanceFromIslandCenter

                    + new Vector3(islandWidth / 2, 0, islandWidth / 2));
            }

            smoothCam.getMoveByVecWithMinSpeed(floatingCameraSpeed);

            age++;
        }
Beispiel #2
0
 public Player()
 {
     smoothCam = new PlayerCam(new Vector3(2079, 50, 1590));
 }