multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.38k stars 424 forks source link

Arrow markers disappear in ground #536

Open ArranTuna opened 5 years ago

ArranTuna commented 5 years ago

Describe the bug When placed too close to the ground, arrow markers get snapped in a really awkward and uncontrollable position, making them totally useless.

To reproduce The following code (serverside or clientside, doesn't matter) creates 2 rows of markers: one row of cylinders, one row of arrows. While cylinders are placed as expected, the arrows close to the ground get moved.

function failMarkerTest()
    local x, y = 0, 0
    for z=0,10,0.5 do
        marker = createMarker(x, y, z, "arrow", 1, 255, 255, 0, 128)
        marker = createMarker(x+1, y, z, "cylinder", 1, 255, 255, 0, 128)
        y = y + 1
    end
end
addCommandHandler("failmarker", failMarkerTest)

Expected behaviour To not get snapped to ground.

Screenshots image

MTA Client:

MTA Server:

Additional context

From https://bugs.mtasa.com/view.php?id=5534

Allerek commented 3 years ago
local x, y = 27.38696, 165
local m = createMarker(x,y,2.6,"arrow",1)
print(getElementPosition(m))
setTimer(function()
    print(getElementPosition(m))
end,1000,1)

^If you look closely, it'll show up in correct position for short while, then it'll go down.

Proxy-99 commented 1 month ago

more like a draw bug when the arrow being drawing through ground or just a code bug who knows what I know this happend againest the ground only