Laurent's Forum Posts

  • thanks,

    Your solution works perfectly on a computer but is non effective for a mobile device (mouse position/mouse wheel).

    Do you have any idea how it could be adapted for touch screen ?

  • Hi to all,

    I guess this is a classic question but I found nothing really conclusive on the forum.

    Construct 2 comes with two exemple of touch scroll/zoom but I was not able to mix them for my needs.

    I have a big map and need to be able to pinch to zoom in and touch/drag to scroll.

    Any idea ?

    Zooming should have min/max values and layer scrolling must be bound to layout.

    Thanks for any help you could provide with that

  • Thanks for the lesson. I appreciate

  • Hi

    Thanks a lot !

    That's exactly what I needed ! But can you explain the formula "set angle to cartire.x degrees" ? Does it take in consideration the size of the sprite ?

  • Guizmus

    Oh great !

    Well I undersrand the math but practically, how will it look like in Construct ?

  • Hi to all !

    Does someone knows how to do that ?

    I'm looking for a formula that applies to a circle sprite. When the sprite moves horizontally, its rotates according to its size.

    That could be useful for wheels of a car as the object is dragged through the screen.

    Such a formula could be turned into a behavior, what do you think ?

  • GeometriX

    Hey, that's a great example ! But there are two problems :

    • the balls goes through the green walls when speed is high and well as when it is dragged.

    Is there a way to correct that ?

  • GenkiGenga, looks great now, thanks !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there,

    GenkiGenga, I was very interested in your example and downloaded it. I made few changes because the button was turning wherever the touch accured on the screen. So I make it happen only when the button is touched. I also made some changes with the variable because once turned, the button couldn't be moved again.

    But I still have one problem : when the button is touched, it immediately goes into one direction before being able to rotate as wished.

    Do you know a way to correct that ?

    Thanks !

    dropbox.com/s/eh88sa6wapizbvg/Touchexample2.capx

  • Hey Excal

    Would you post a .capx to show us ?

    Thanks !

  • shinkan : any success with this issue, yet ?

  • Let's see.

    touc count :

    • One finger on screen : 1
    • Two fingers on screen : 2
    • 3 fingers : 3

    ...

    no finger on screen : 0

    On ipad 2, touch event stops as it should

  • Ok, here's the feedback for an ipad 2 :

    • scroll is ok
    • zoom is works but very eraticly. Sometime you pinch and it zooms out, sometimes the oposite.
    • zoom scale range is between 1 and 0,5
    • fps varies from 59 to 61 wen zooming, stays at 60 when no action.
    • scrolling has no layout constraints. It's easy to make the map (Poland !) disappear in the margins.

    Hope it helps

  • Thanks R0J0hound for that example !

    But it doesn't really works for me neither.

    I wanted to be able to scroll and zoom on a big map. Scroll should be constrained to the boundaries of the layout and zoom should have a min and a max intensity.

    Any idea about how to do that ?

  • rexrainbow

    Lovely !