Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
TheLaserPointers
API is a subset of the Pointers API. It lets
you create, manage, and visually
represent objects for repeatedly calculating ray intersections with
avatars, entities, and
overlays. Ray pointers can also
be configured to generate events on entities and overlays intersected.
Deprecated: This API is deprecated and will be removed. Use Pointers instead.
Methods
| Name | Return Value | Summary |
|---|---|---|
createLaserPointer
|
number |
Creates a new ray pointer. The pointer can have a wide range of behaviors depending on the properties specified. For example, it may be a static ray pointer, a mouse ray pointer, or joint ray pointer. Warning: Pointers created using this method currently always intersect at least visible and collidable things but this may not always be the case. |
disableLaserPointer
|
None |
Disables and hides a pointer. Disabled pointers do not update their pick results or generate events. |
editRenderState
|
None |
Edits a render state of a pointer, to change its visual appearance for the state when the pointer is intersecting something. Note: You can only edit the properties of the existing parts of the pointer; you cannot change the type of any part. Note: You cannot use this method to change the appearance of a default render state. |
enableLaserPointer
|
None |
Enables and shows a pointer. Enabled pointers update their pick results and generate events. |
getPrevRayPickResult
|
RayPickResult |
Gets the most recent intersection of a pointer. A pointer continues to be updated ready to return a result, as long as it is enabled, regardless of the render state. |
isLeftHand
|
boolean |
Checks if a pointer is associated with the left hand:
a pointer with
|
isMouse
|
boolean |
Checks if a pointer is associated with the system
mouse: a pointer with
|
isRightHand
|
boolean |
Checks if a pointer is associated with the right
hand: a pointer with
|
removeLaserPointer
|
None |
Removes (deletes) a pointer. |
setIgnoreItems
|
None |
Sets a list of entity and avatar IDs that a pointer should ignore during intersection. |
setIncludeItems
|
None |
Sets a list of entity and avatar IDs that a pointer should include during intersection, instead of intersecting with everything. |
setLaserLength
|
None |
Sets the length of a pointer. |
setLockEndUUID
|
None |
Locks a pointer onto a specific entity or avatar. |
setPrecisionPicking
|
None |
Sets whether or not a pointer should use precision
picking, i.e., whether it should
pick against precise meshes or
coarse meshes. This has the same effect as using
the |
setRenderState
|
None |
Sets the render state of a pointer, to change its visual appearance and possibly disable or enable it. |
Method Details
|
(static)
createLaserPointer( properties
) →
{number}
Returns: The ID of the pointer if successfully created, otherwise 0.
|
||||||
|---|---|---|---|---|---|---|
|
Creates a new ray pointer. The pointer can have a wide range of behaviors depending on the properties specified. For example, it may be a static ray pointer, a mouse ray pointer, or joint ray pointer. Warning: Pointers created using this method currently always intersect at least visible and collidable things but this may not always be the case. Parameters
|
| (static) disableLaserPointer( id ) | ||||||
|---|---|---|---|---|---|---|
|
Disables and hides a pointer. Disabled pointers do not update their pick results or generate events. Parameters
|
| (static) editRenderState( id, renderState, properties ) | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Edits a render state of a pointer, to change its visual appearance for the state when the pointer is intersecting something. Note: You can only edit the properties of the existing parts of the pointer; you cannot change the type of any part. Note: You cannot use this method to change the appearance of a default render state. Parameters
|
| (static) enableLaserPointer( id ) | ||||||
|---|---|---|---|---|---|---|
|
Enables and shows a pointer. Enabled pointers update their pick results and generate events. Parameters
|
|
(static)
getPrevRayPickResult( id
) → {RayPickResult}
Returns: The most recent intersection of the pointer. |
||||||
|---|---|---|---|---|---|---|
|
Gets the most recent intersection of a pointer. A pointer continues to be updated ready to return a result, as long as it is enabled, regardless of the render state. Parameters
|
|
(static)
isLeftHand( id
) →
{boolean}
Returns: true if the pointer is
associated with the left hand,
false if it isn't.
|
||||||
|---|---|---|---|---|---|---|
|
Checks if a pointer is associated with the
left hand: a pointer with
Parameters
|
|
(static)
isMouse(
id )
→ {boolean}
Returns: true if the pointer is
associated with the system mouse,
false if it isn't.
|
||||||
|---|---|---|---|---|---|---|
|
Checks if a pointer is associated with the
system mouse: a pointer with
Parameters
|
|
(static)
isRightHand( id
) →
{boolean}
Returns: true if the pointer is
associated with the right hand,
false if it isn't.
|
||||||
|---|---|---|---|---|---|---|
|
Checks if a pointer is associated with the
right hand: a pointer with
Parameters
|
| (static) removeLaserPointer( id ) | ||||||
|---|---|---|---|---|---|---|
|
Removes (deletes) a pointer. Parameters
|
| (static) setIgnoreItems( id, ignoreItems ) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Sets a list of entity and avatar IDs that a pointer should ignore during intersection. Parameters
|
| (static) setIncludeItems( id, includeItems ) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Sets a list of entity and avatar IDs that a pointer should include during intersection, instead of intersecting with everything. Parameters
|
| (static) setLaserLength( id, laserLength ) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Sets the length of a pointer. Parameters
|
| (static) setLockEndUUID( id, targetID, isAvatar, offsetopt ) | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Locks a pointer onto a specific entity or avatar. Parameters
|
| (static) setPrecisionPicking( id, precisionPicking ) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Sets whether or not a pointer should use
precision picking, i.e., whether it
should pick against precise meshes or
coarse meshes. This has the same effect
as using the Parameters
|
| (static) setRenderState( renderState, id ) | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Sets the render state of a pointer, to change its visual appearance and possibly disable or enable it. Parameters
|
