UpdateCameraPose: Difference between revisions
Document upcoming 0.1.4 weapon confirmation and mouse camera APIs |
Release 0.1.4 BUILD133 / Protocol 36 and document authenticated event origin |
||
| Line 1: | Line 1: | ||
= UpdateCameraPose = | = UpdateCameraPose = | ||
'''Client-side; since 0.1.4 | '''Client-side; since 0.1.4.''' Alias: <code>updateCameraPose</code>. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Latest revision as of 20:41, 21 September 2026
UpdateCameraPose
Client-side; since 0.1.4. 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.