You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--initlocalactive_camera=Gamera.new(0, 0, 1024, 512)
--in drawlocalscreen_x, screen_y, screen_w, screen_h=active_camera:getWindow()
localworld_x, world_y, world_w, world_h=active_camera:getWorld()
localdx=Imgui.SliderInt("x", screen_x, 0, world_w)
localdy=Imgui.SliderInt("y", screen_y, 0, world_h)
print(dx, dy) --worksactive_camera:setPosition(dx, dy)
print(active_camera:getWindow()) --should be updated, but prints 0, 0, 1024, 512 still
the position value of the window should change, but it returns to 0 :/
setPosition changes the x and y position of the Window (subset of World), but it resets to 0
ive tried
active_camera.x=dxactive_camera.y=dy
but instead of resetting to 0, it resets to 512 (half of 1024), because internally gamera computes position and width since (0,0) in camera coordinates is center
I think you misunderstood what position is and what window is in gamera.
Imagine a news reporter moving around on his car, shooting footage with their camera. And then imagine a person sitting on their living room, watching the news on their TV.
The coordinates the news camera is looking at is position.
The coordinates of the person watching the news on their living room is the window.
They are related, in a way, but not in the way you are thinking. If the position changes, the content showed on the window will change, but the window will not move.
i need help with this:
the position value of the window should change, but it returns to 0 :/
setPosition changes the x and y position of the Window (subset of World), but it resets to 0
ive tried
but instead of resetting to 0, it resets to 512 (half of 1024), because internally gamera computes position and width since (0,0) in camera coordinates is center
Sent from my HUAWEI GR5 2017 using FastHub
The text was updated successfully, but these errors were encountered: