UpdateCameraPose

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 13:53, 19 September 2026 by QCherry (talk | contribs) (Document upcoming 0.1.4 weapon confirmation and mouse camera APIs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

UpdateCameraPose

Client-side; since 0.1.4 (in development, not public 0.1.3). Alias: updateCameraPose.

boolean UpdateCameraPose(table pose)

Updates a ready scripted camera already owned by the calling resource. This does not acquire a camera. pose supports x, y, z in metres; yaw, pitch, roll in degrees; and fov. Omitted fields use the last acknowledged pose. Non-finite or out-of-range values are rejected. For continuous control, maintain and submit your complete desired pose.

Returns true for mailbox acceptance, not a command ID or native completion. Multiple updates coalesce to the newest pose. At most one update is awaiting native acknowledgement; publication is limited to approximately 60 Hz. onClientCameraStreamError(reason) reports a failed update or a 2-second stream timeout. A timed-out owned stream releases its camera. Ordinary camera commands keep their existing result event.

Acquire through SetCameraPose and wait for onClientCameraCommandResult; release with ResetCameraPos. See Mouse capture for mouse-driven examples and test commands.