Advertisement
Guest User

booty code

a guest
Mar 29th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1.  
  2. /* THIS CODE IS IN MY CAMERA CLASS < MY MOVEMENT "IF" STATEMENT > */
  3.  
  4. for (int i = 0; i < game.modelManager.boxes.Count; i++)
  5. {
  6. if (game.currentGPState.ThumbSticks.Left.Y != 0.0f)
  7. {
  8. //Moves the camera forwards and backwards
  9. 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))
  10. {
  11. cameraPosition += new Vector3(cameraDirection.X, cameraDirection.Y, cameraDirection.Z) * walkingSpeed * game.currentGPState.ThumbSticks.Left.Y;
  12. game.Window.Title = "";
  13. }
  14. else
  15. {
  16. game.Window.Title = "Collision";
  17. }
  18. break;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement