Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts • Server Entity Scripts • Assignment Client Scripts
TheDebugDraw
API renders debug markers and lines. These markers are only visible locally; they are not visible
to other users.Methods
Name | Return Value | Summary |
---|---|---|
addMarker
|
None |
Adds or updates a debug marker in world coordinates. This marker is drawn every frame until it is removed using
removeMarker. If a world coordinates debug marker of the specified |
addMyAvatarMarker
|
None |
Adds or updates a debug marker to the world in avatar coordinates. This marker is drawn every frame until it is removed
using removeMyAvatarMarker. If an avatar coordinates debug marker of the
specified |
drawRay
|
None |
Draws a line in world space, visible for a single frame. To make the line visually persist, you need to repeatedly draw it. |
drawRays
|
None |
Draws lines in world space, visible for a single frame. To make the lines visually persist, you need to repeatedly draw them. Note: Currently doesn't work. |
removeMarker
|
None |
Removes a debug marker that was added in world coordinates. |
removeMyAvatarMarker
|
None |
Removes a debug marker that was added in avatar coordinates. |
Method Details
(static) addMarker( key, rotation, position, color, size ) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Adds or updates a debug marker in world coordinates. This marker is drawn every frame until it is removed using
removeMarker. If a world coordinates debug marker of the specified Parameters
ExampleBriefly draw a debug marker in front of your avatar, in world coordinates.
|
(static) addMyAvatarMarker( key, rotation, position, color, size ) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Adds or updates a debug marker to the world in avatar coordinates. This marker is drawn every frame until it is removed
using removeMyAvatarMarker. If an avatar coordinates debug marker of the
specified Parameters
ExampleBriefly draw a debug marker in front of your avatar, in avatar coordinates.
|
(static) drawRay( start, end, color ) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Draws a line in world space, visible for a single frame. To make the line visually persist, you need to repeatedly draw it. Parameters
ExampleDraw a red ray from your initial avatar position to 10m in front of it.
|
(static) drawRays( lines, color, translationopt, rotationopt ) | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Draws lines in world space, visible for a single frame. To make the lines visually persist, you need to repeatedly draw them. Note: Currently doesn't work. Parameters
ExampleDraw a red "V" in front of your initial avatar position.
|
(static) removeMarker( key ) | ||||||
---|---|---|---|---|---|---|
Removes a debug marker that was added in world coordinates. Parameters
|
(static) removeMyAvatarMarker( key ) | ||||||
---|---|---|---|---|---|---|
Removes a debug marker that was added in avatar coordinates. Parameters
|