Difference between revisions of "VEHICLE FLAG CAMERA DECOUPLED"

From Second Life Wiki
Jump to navigation Jump to search
m
(Try to provide a clearer explanation of the consequences of using VEHICLE_FLAG_CAMERA_DECOUPLED)
 
(3 intermediate revisions by 3 users not shown)
Line 3: Line 3:
|type=integer
|type=integer
|value=0x200
|value=0x200
|desc=Makes mouselook camera rotate independently of the vehicle. By default the client mouselook camera will rotate about with the vehicle, however when this flag is set the camera direction is independent of the vehicle's rotation.
|desc=This flag only has an effect when steering a vehicle with [[mouselook]].  In other words, only when either [[VEHICLE_FLAG_MOUSELOOK_STEER]] or [[VEHICLE_FLAG_MOUSELOOK_BANK]] are also set. When it is in effect it has zero server-side consequences, except that a bit is set in the '''flags''' field in the vehicle's [[ObjectUpdate]] message sent from server to client. The client uses the flag as a hint for how to compute its mouselook camera orientation as vehicle moves under the seated avatar.
 
When the flag is NOT set the avatar's mouselook camera will move in the world-frame as the vehicle changes its own world-frame orientation. The avatar's mouselook camera is effectively at an offset relative to the vehicle's local-frame.
 
When the flag IS set the avatar's mouselook camera will be unaffected by the motion of the vehicle itself: it moves only in the world-frame according to user input.
|example
|example
<!--
<!--
Line 15: Line 19:
<!--{{LSL DefineRow||[[changed]]|}}-->
<!--{{LSL DefineRow||[[changed]]|}}-->
|articles={{LSL DefineRow||[[Linden Vehicle Tutorial]]}}
|articles={{LSL DefineRow||[[Linden Vehicle Tutorial]]}}
|cat1=Vehicle
|cat1=Vehicle/Flags
|cat2
|cat2
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 16:20, 2 July 2024

Description

Constant: integer VEHICLE_FLAG_CAMERA_DECOUPLED = 0x200;

The integer constant VEHICLE_FLAG_CAMERA_DECOUPLED has the value 0x200

This flag only has an effect when steering a vehicle with mouselook. In other words, only when either VEHICLE_FLAG_MOUSELOOK_STEER or VEHICLE_FLAG_MOUSELOOK_BANK are also set. When it is in effect it has zero server-side consequences, except that a bit is set in the flags field in the vehicle's ObjectUpdate message sent from server to client. The client uses the flag as a hint for how to compute its mouselook camera orientation as vehicle moves under the seated avatar.

When the flag is NOT set the avatar's mouselook camera will move in the world-frame as the vehicle changes its own world-frame orientation. The avatar's mouselook camera is effectively at an offset relative to the vehicle's local-frame.

When the flag IS set the avatar's mouselook camera will be unaffected by the motion of the vehicle itself: it moves only in the world-frame according to user input.

Caveats


Related Articles

Functions

•  llSetVehicleFlags
•  llRemoveVehicleFlags

Articles

•  Linden Vehicle Tutorial

Deep Notes

Search JIRA for related Issues

Signature

integer VEHICLE_FLAG_CAMERA_DECOUPLED = 0x200;