Player-controlled actors manage the viewport camera within the
IActor::UpdateView(SViewParams &viewParams) and
IActor::PostUpdateView(SViewParams &viewParams) functions.
SViewParams struct is used to define camera properties such as position, rotation, and field of view. By modifying the
viewParams reference inside the
UpdateView method, we can move our camera to the position we require for our game.
CryMono actors receive and handle the
UpdateView(ref ViewParams viewParams) and
PostUpdateView(ref ViewParams viewParams) events in the same way C++ actors do.
In order to get view events, we'll need to implement and register a game object view. To do so, start by deriving from
IGameObjectView, and ...