Skip to content

llForceMouselook

function
Function syntax
llForceMouselook(
  1. integer mouselook// Boolean. If TRUE, forces a sitting avatar into mouselook; if FALSE, allows them to keep their current camera mode
);
Energy
10

Sets whether any avatar sitting on this prim is forced into mouselook mode. Setting mouselook to TRUE forces the mode; FALSE (default) allows the avatar to keep their current camera mode.

Sets if a sitting avatar should be forced into mouselook when they sit on this prim.1

A sit target is not necessary for this function to work.

How to use
llForceMouselook(0);
  • This function has no effect on avatars already seated.2
  • The user may exit mouselook mode at any time.
  • This can be detected by polling llGetAgentInfo.
  • There is nothing stopping someone from modifying or making a client that ignores this.
Force Mouselook on Sit
default
{
state_entry()
{
llForceMouselook(TRUE); // Forces sitting avatars into mouselook.
llForceMouselook(FALSE); // Reverts the setting to the default...
// ...as with a newly created prim.
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

  1. Viewer 746d768339: newview/llviewermessage.cpp:4233-4234; newview/llviewermessage.cpp:4241; newview/llvoavatar.cpp:7987-7990 ↩

  2. Viewer 746d768339: newview/llvoavatar.cpp:7973-7990 ↩