User:Monster Iestyn/Camera

From SRB2 Wiki
Jump to: navigation, search
Test.png This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article.

In SRB2, the camera is the entity or viewpoint the game is viewed from. There are two main types of camera used in SRB2:

  • Third-person camera (or Chase camera): This is the default type of camera used in Single Player, Coop, Race and Competition. This camera is an arbitrary viewpoint that "chases" the player it belongs to, allowing the user to see their character in-game as in most Sonic games. By default, the camera will follow directly behind the player at all times, and cannot be manually rotated (except in development mode). If the player is playing with Analog control, the camera's direction is independent of the player and the user is able to rotate the camera freely; however, it will automatically turn itself to view the player if they attempt to go off-screen.
  • First-person camera: This is the default type of camera used in Match, CTF, Tag and related variants, and was the type of camera originally used in Doom. The player itself acts as the camera for the game, and the view will bob up and down as the player walks or runs. Additional elements will be displayed in the HUD whenever certain power-ups (e.g. shields, invincibility, Super Sneakers) are in effect for the player. A crosshair graphic also appears by default in the center of the screen; the console variable crosshair can be used to either switch between the available crosshair types, or turn the crosshair off.

The player's Toggle Chasecam control, or the console variable chasecam, can be used to toggle between the third-person and first-person cameras. See Controls > Camera for other controls related to the camera.

Console variables

Cut-Away View

This is a special type of camera that temporarily allows a player to view the game from an different location to that of the normal camera types. When linedef type 422 is triggered, an Alternative View Point will be used as this camera for a specified amount of time. However, Lua can allow any Object to be used as a Cut-Away View camera by modifying the player's player.awayviewmobj and player.awayviewtics variables. The player.awayviewaiming variable can also be used to adjust the vertical viewing angle used by the player's Cut-Away View camera. See Lua/Userdata structures > player_t for more information.

Unsorted