Player Spectator
A player spectator is a free flying camera without a physical body, which is approximated with a sphere and therefore can collide with objects (however, it cannot, for example, push or interact with them).
As well as for a player actor, the viewing orientation of a player spectator in space is defined by 2 angles - theta and phi - and by the up vector that usually coincides with the Z axis:
- When changing the theta angle, the vertical view direction of the player actor changes.
- When changing the phi angle, the horizontal view direction and the basis of the player actor change.
A player spectator can be used to create a spectator mode that allows for observing the world. Due to collisions, movement of the camera can be limited.
As any transformation of a player forces it to recalculate its inner state (position, direction, angles and so on), the up direction of the player's viewport may become "negative forward". And then transformation will be recalculated by using this direction, causing flip of the player's basis. To avoid such flipping, the theta and phi angles should be recalculated by using the current viewing orientation of the player.
See also
- A PlayerSpectator class to edit players via API
Editing a Player Spectator
In the Player Spectator tab, you can adjust the bit-masks, viewing frustum parameters and also the following parameters of the spectator:
A Player Spectator Tab
Last update: 10.08.2018
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter