CameraMode is an Entity Components that can be put on any entity. It just allows us to say what Camera mode we want to make and or use on the player. such as
- First Person
- Third Person
- Free Cam
Player class that most games will be using already has CameraMode Property in there so all you need to do is set it.
The camera controls the position and rotation of the rendered scene on screen, imagine the camera as the players eyes, and where they are placed and rotated and such.
It also controls things like the field of view and whether or not to draw the player model.
If you set Viewer it won't render that entity.
In first person modes you should set it to the entity you're inhabiting. In third person you should set it to null.
Setting the Camera is the same as setting a Player Controller.
Like the Player Controller, this property can be changed at any time and is replicated to the client.
Getting our current camera from the player is almost as simple as how we set it.
However if you want to get the camera of any entity, you can also just do as so below.