i use rendercam and this code for X axis animation standart 2d coord to 3d
all animation build with panthera
local node_body = global_.go_robots[message.uid].body.s2
local node_body_position = go.get(node_body, "position")
local sc = rendercam.world_to_screen(node_body_position, false, false)
sc.x = sc.x + 15 -- **+ 15px to right**
local wd = rendercam.screen_to_world_2d(sc.x, sc.y, false, sc.z, false)
go.animate(node_body, POSITION_X, go.PLAYBACK_ONCE_FORWARD, wd.x, gui.EASING_OUTSINE, 1 / speed)
Seems to work correctly both forward and backward.
But if I try Animate Y coord - GO always move down (((
local node_body_position = go.get(node_body, "position")
local sc = rendercam.world_to_screen(node_body_position, false, false)
sc.y = sc.y + 5 -- **even if I subtract or add**
local wd = rendercam.screen_to_world_2d(sc.x, sc.y, false, sc.z, false)
go.animate(node_body, POSITION_Y, go.PLAYBACK_ONCE_FORWARD, wd.y, gui.EASING_OUTSINE, 0.25 / speed, 0, function()
end)