Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* THIS CODE IS IN MY CAMERA CLASS < MY MOVEMENT "IF" STATEMENT > */
- for (int i = 0; i < game.modelManager.boxes.Count; i++)
- {
- if (game.currentGPState.ThumbSticks.Left.Y != 0.0f)
- {
- //Moves the camera forwards and backwards
- if (!game.CollidesWith(game.modelManager.cameraObj.Model, Matrix.CreateTranslation(cameraPosition + new Vector3(cameraDirection.X, cameraDirection.Y, cameraDirection.Z)), game.modelManager.boxes[i].Model, game.modelManager.boxes[i].world))
- {
- cameraPosition += new Vector3(cameraDirection.X, cameraDirection.Y, cameraDirection.Z) * walkingSpeed * game.currentGPState.ThumbSticks.Left.Y;
- game.Window.Title = "";
- }
- else
- {
- game.Window.Title = "Collision";
- }
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement