I want to move the camera on the map scene to the right the same distance you move the finger to the left, to create a scrolling efect. How to do that?
Have you checked https://forum.defold.com/t/how-to-use-the-camera/464/9 and the http://www.defold.com/doc/cameras?
I already created the camera, sorry for the late response and thanks for the answer.
Now i have a little problem. The scrolling is working good but i’m using the action.repeated to check if the user is still pressing the mouse button when he moves the mouse but seems that the action.repeated takes like a second to be active and then it looks like the game have lag because when you move the mouse to scroll the map, the map don’t move after a second.
Any solution? =S
Can’t you just track pressed and released in a local variable and while pressed you simply move the camera according to the delta values you get each on_input() call? You don’t have to rely on repeated.
i don’t get it. Can you do a simple code to see what you mean?
ok solved the problem, thx for the help ^^
Sorry for not responding sooner. I’m glad to hear that you solved it!