Hello there!
When I tried to draw two lines that start from the same point using
msg.post('@render:', 'draw_line', ...)
I found that it didn’t act properly, as the following capture shows.
It appeared these two lines don’t start from the same point. What’s going on?
My script:
function update(self, dt)
local p = vmath.vector3(100, 100, 0)
msg.post('@render:', 'draw_line', {
start_point = p,
end_point = vmath.vector3(100, 300, 0),
color = vmath.vector4(1, 1, 1, 1)
})
msg.post('@render:', 'draw_line', {
start_point = p,
end_point = vmath.vector3(300, 100, 0),
color = vmath.vector4(1, 1, 1, 1)
})
end