Well, it seems what i'm looking for is too complicated with the actual node. I found an other way to make the minimap.
This is it: i finally found what's wrong:
- I need to move the origin node of the box drawned in the center of the screen (same location than the camera)
- I need to substract the half root viewport screen but multiply the result by the camera's zoom.
relocalize where the bow must start:
position = camera.position
var test = (mousePos - Vector2(512, 384))*1.2 # root viewport resolution is 1024 x 768, so divided by 2
drawCadre(PoolVector2Array([test, test, test, test]))
var pos = areaSelect.get_points() # this is the collision box shape
var test = (mousePos - Vector2(512, 384))*1.2
drawCadre(PoolVector2Array([Vector2(pos.x, pos.y), Vector2(test.x, pos.y), test, Vector2(pos.x, test.y)]))
The position of the nodes in the tree doesn't interfere counter to i did beleive, but the little script in the viewport unlock a "bug".