Difference between revisions of "Category:LSL Controls"

From Second Life Wiki
Jump to navigation Jump to search
 
m
Line 10: Line 10:
'''Usage Examples'''
'''Usage Examples'''


You can force an Avatar into {{LSLGC|Mouselook|mouselook}} when they sit on an object to prepare them for interacting with that object.
You can force an Avatar into LlForceMouselook when they sit on an object to prepare them for interacting with that object.


You can turn and move an object based on the Avatar's movement keys.
You can turn and move an object based on the Avatar's movement keys.

Revision as of 06:21, 5 April 2007

Controls in LSL generally refer to controlling cameras or objects. Avatar input keys (movement keys and mouseclicks) can be caught and objects can be made to perform certain actions based on those keys, but you cannot control an agent's movement with LSL.

However, you can control the camera of an agent as well as capture an agent's camera position and rotation. You can also determine if an agent is currently in mouselook.

Before being able to do any of the above, the script must request the appropriate permissions from the agent with llRequestPermissions

Unfortunately, there is no way to determine the position of the client's pointer using only LSL.

Usage Examples

You can force an Avatar into LlForceMouselook when they sit on an object to prepare them for interacting with that object.

You can turn and move an object based on the Avatar's movement keys.

You can check if an Avatar is looking at your object.

Functions

llTakeControls
llSetCameraParams
llClearCameraParams
llReleaseControls

Events

control