Mobile touch panning controls

0 favourites
  • 3 posts
From the Asset Store
Supports keyboard, mouse and gamepads. Supports several gamepads at once.
  • I implemented some panning controls in my game but it breaks once the "camera object" leaves the initial position at the top of the layout.

    I can't find anything anywhere to get the mouse position on the window, not the layout, as they are different sizes (layout is far larger). So When I "pan" outside of the starting position, it switches back and fourth really fast because the touch coordinates are adding the distance from the north and west edges of the window, and the layout edges.

    As a side note I absolutely scoured the internet and this website and spent hours in trial and error trying to get panning controls working.. I found one or two topics on them here, but one did not work and the other had a capx had an expired link. Please feel free to use the script I made for your game and let me know if there is an easier way to do it. I know there has to be than using 8 variables.

    Thank you in advance.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, it can be done much easier. Remove the camera sprite and change your events like this:

  • Thank you dop2000. Your reply worked wonders. This got rid of the spastic movement of the camera object and I dont have to bind an object to the layout. Thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)