DebugDraw

Available in: Interface Scripts Client Entity Scripts Server Entity Scripts Assignment Client Scripts

Helper functions to render ephemeral debug markers and lines. DebugDraw markers and lines are only visible locally, they are not visible by other users.
Methods

Methods

addMarker(key, rotation, position, color)
Adds a debug marker to the world. This marker will be drawn every frame until it is removed with DebugDraw.removeMarker. This can be called repeatedly to change the position of the marker.
Parameters:
Name Type Description
key string name to uniquely identify this marker, later used for DebugDraw.removeMarker.
rotation Quat start position of line in world space.
position Vec3 position of the marker in world space.
color Vec4 color of the marker.
addMyAvatarMarker(key, rotation, position, color)
Adds a debug marker to the world, this marker will be drawn every frame until it is removed with DebugDraw.removeMyAvatarMarker. This can be called repeatedly to change the position of the marker.
Parameters:
Name Type Description
key string name to uniquely identify this marker, later used for DebugDraw.removeMyAvatarMarker.
rotation Quat start position of line in avatar space.
position Vec3 position of the marker in avatar space.
color Vec4 color of the marker.
drawRay(start, end, color)
Draws a line in world space, but it will only be visible for a single frame.
Parameters:
Name Type Description
start Vec3 start position of line in world space.
end Vec3 end position of line in world space.
color Vec4 color of line, each component should be in the zero to one range. x = red, y = blue, z = green, w = alpha.
removeMarker(key)
Removes debug marker from the world. Once a marker is removed, it will no longer be visible.
Parameters:
Name Type Description
key string name of marker to remove.
removeMyAvatarMarker(key)
Removes debug marker from the world. Once a marker is removed, it will no longer be visible
Parameters:
Name Type Description
key string name of marker to remove.