Jump to content

[Help] createMarker


Recommended Posts

You have to use DX functions, or just find similar object and create invisible marker on it.

No no. its not working like that because when im far a bit from the marker i see the normal one but when im near i see the one like on the pic ( getDistanceBetweenPoints3D ). i think i can change marker object with txd workshop ?

Link to comment

To even begin using the function, you need to render it like so.

local position = { 
    startX = 0, -- x coordinate of the start position 
    startY = 0, -- y coordinate of the start position 
    startZ = 4, -- z coordinate of the start position 
    endX = 10, -- x coordinate of the end position 
    endY = 10, -- y coordinate of the end position 
    endZ = 10 -- z coordinate of the end position 
} 
  
addEventHandler( "onClientHUDRender", root, 
    function( ) 
        dxDrawLine3D( position.startX, position.startY, position.startZ, position.endX, position.endY, position.endZ, tocolor( 245, 20, 20, 180 ), 3.25 ) 
    end 
) 

That marker is made with mathematical calculations to make it a circle. Simply just read more about trigonometric functions and test the formula examples, which you can find by searching on Google. The one you are especially looking for is the unit circle.

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...