Skip to main content

UpdateMarker

The primary function for creating markers.

Function

local Markers = WXSCore.Markers
Markers:UpdateMarker(id, newValues)

changeableMarkerData

NameTypeDescription
typeintegerThe type of the marker.
posvector3The position of the marker.
dirvector3The direction of the marker.
rotvector3The rotation of the marker.
scalevector3The scale of the marker.
colortablea table containing the r, g, b and a colors
bobUpAndDownbooleanWhether or not the marker should bob up and down.
faceCamerabooleanWhether or not the marker should face the camera.
rangenumberThe range of when the marker should draw
markerCallbackfunctionThe function to call when the marker is interacted with.

Parameters

NameTypeDescription
idintegerThe marker ID returned from the functions.
newValueschangeableMarkerDataThe new values to update the marker with.

Example

local Markers = WXSCore.Marker

Markers:UpdateMarker(
markerId,
{
type = 1,
pos = vector3(0.0, 0.0, 0.0),
dir = vector3(0.0, 0.0, 0.0),
rot = vector3(0.0, 0.0, 0.0),
scale = vector3(0.0, 0.0, 0.0),
color = { r = 255, g = 255, b = 255, a = 255 },
bobUpAndDown = true,
faceCamera = true,
range = 25.0,
markerCallback = function(markerId, didEnter)
print(markerId, didEnter)
end
}
)