Currently in Beta
feel free to use this code, i only made it to see if it was possible to put "more clear" text in 3d space (its really a bunch of images from a spritesheet/billboard)
Required Libraries
Description
Allows display of an arrow in 3D space which points to a marker and displays how far away it is in meters.
Arrow, marker and distance is automatically updated in real time as the player moves around
Demo Addon
Check out
WhereAreYou for a demo of this Lib being used
Usage
1: Create/Set up and return a 3dArrow object named "waypoint" (you can also skip setting these parameters and it will use defaults)
Code:
waypoint = Lib3DArrow:CreateArrow({
depthBuffer = false,
arrowMagnitude = 5,
arrowScale = 1,
arrowHeight = 1,
arrowColour = "FF0000",
distanceDigits = 4,
distanceScale = 25,
distanceColour = "FFFFFF",
markerColour = "FF0000",
markerScale = 1,
})
2: Set Target to point to
Code:
waypoint:SetTarget(x, y)
3: Remove arrow
Code:
waypoint:SetTarget(0, 0)
4: Show or Hide individual parts of the 3DArrow
- arrow is the actual arrow,
- distance is the number of metres displayed
- marker is the big beam pole thingy
Code:
waypoint.arrow:SetHidden(true/false)
waypoint.distance:SetHidden(true/false)
waypoint.marker:SetHidden(true/false)