Posted April 24, 2020 by aloelazoe
with another dimension comes a whole lot of new concepts to consider, and so emerge the scary lists of new options and settings in bitsy 3d. this is the first in the series of articles attempting to make those things a bit less confusing. this one is a little overview of what different camera presets and advanced camera options do.
tip: when you use first person presets you might want to set the avatar to "hidden" in the mesh settings
there are two basic types of cameras in bitsy 3d: arc and universal. they share some of the properties but their behavior is different and their position is described in different terms.
lock pointer will hide the mouse pointer when the player clicks on bitsy 3d canvas for the first time and will show it again after pressing escape. locking the pointer also affects the behavior of a controllable camera: when the pointer is not locked, the player needs to click and then drag the mouse to pan the camera, and when it is locked, the camera will adjust immediately as they move the mouse, without the need to click.
fov or field of view determines the amount of perspective distortion & how much stuff can fit on the screen. usually you would want a value a bit less or a bit more than 1.
min z and max z describe near and far clipping planes, that is, whether a certain object will be visible or not depending on its distance from the camera: if it's in range between "min z" and "max z" it will be visible, and if not it will be ignored or "clipped". it might be helpful to decrease "max z" when performance is the concern and adjust "min z" when objects very close to the camera are not displayed as expected.
the position of arc camera is always described relative to a target. a target could be set to a fixed point in space by specifying x, y, z coordinates of the target property, or alternatively, bitsy avatar could be assigned as a target by enabling follow avatar option.
arc camera is always facing the target.
the position of arc camera is described in terms of its angle and its distance from the target: imagine a sphere where the target is in the middle and camera is at a certain point on the surface of this sphere. alpha is the horizontal angle, beta is the vertical angle and radius is the distance to the target.
when attach control property is checked, the player can freely pan around the target with the mouse.
there is also an option to use left and right (or a and d keys) to rotate the camera by a specified angle. use left and right to rotate by angle could be set to 0 to turn this option off, or it could be set to an angle by which you want to rotate. using a negative or positive number will determine the direction in which you rotate.
arc camera is very versatile: it can be used to create still shots with fixed angle and controllable third person and first person cameras. to use it as a first person camera you simply make it follow the avatar and set the "radius" to a really small value. when the camera is controllable, it could also be zoomed in and out with the mouse wheel, i.e. its radius can be changed by the input from the player. lower radius limit, upper radius limit and wheel precision properties can be used to customize this behavior. if you want to allow panning the camera but disable zooming in and out completely, you can set both radius limits and the radius itself to the same value.
similar to radius limits, upper beta limit and lower beta limit can be used to constrict or limit vertical panning of the camera.
tip: if you want to create a still shot, you can press "preview game camera" button, then enable "attach control", set the position of the camera the way you want in 3d scene panel, apply new alpha, beta and radius values in the camera panel and then disable the controls.
unlike the position of arc camera which is described through angles and radius, the position of universal camera is simply described as its coordinates in the scene. the rotation of universal camera can be set directly as well, or it could be set to follow avatar: in this case it will stay in its fixed position but will rotate automatically to keep the avatar in focus.