Marker only visible when you walk through it

Hello there,

So i’ve got a bit of an issue. When I walk through the area the blip is supposed to be at it appears BUT only on certain angles and not really that well visible… Any idea how to fix this? Image & code attached fyi.

Citizen.CreateThread(function()

    while true do

        Citizen.Wait(0)

        

        local playerCoords, letSleep = GetEntityCoords(PlayerPedId()), true

        for k, v in pairs(Config.Shops) do

            for _, coords in pairs(v.coords) do

                local distance = #(playerCoords - coords)

                if distance < 3.0 then 

                    letSleep = false

                    local marker = {

                        type = v.markerType or 1,

                        coords = coords,

                        color = v.markerColour or { r = 55, b = 255, g = 55 },

                        size = v.size or vector3(1.0, 1.0, 1.0)

                    }

                    DrawMarker(marker.type, marker.coords, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 0.3, 0.3, 0.2, 147, 112, 219, 100, marker.color.r, marker.color.g, marker.color.b, 100, false, true, 2, true, false, false, false)

                end

            end

        end

        if letSleep then

            Citizen.Wait(500)

        end

    end

end)

That’s usually caused by the marker being placed too deep into the ground - move it up a little (on the Z axis) and it should be good

1 Like

I know the screenshot wasn’t clear here’s a more clear one, as you can see it isn’t in the ground whatsoever it’s very weird


it looks like its glitched into the air xd

A bit strange is the usage of your booleans, especially the sixth and the fourth counting from the back. You got Rotate and FaceCamera on true. They do two contrary things and might cause problems. Try deactivating one and check again.

Right, will do thanks