Laurent's Forum Posts

  • Hi to all,

    I made a little project to explore an ancient WWI battlefield with satellite photos.

    Everything is ok with it but I'd like to add a zoom function with :

    • zooming with touch on a tablet
    • zooming with + and - buttons for desktop computer use
    • keep the pictures within the screen (i.e. no blanks around it)
    • constraint zooming within x1 and x0.3 (till photo fills screen)

    Here's the link to the project :

    dropbox.com/s/5dsyorvh79u5zdj/Photo1914.capx

    thanks for any help !

  • Just a note to show that Construct2 is not only for games :)

    This is a simple satellite photo explorer that shows the same place in France in 1918 and in 2010.

    Enjoy the visit

    27mai.free.fr/Oise1918

  • emoaeden & LittleStain

    Let me be more precise.

    At start of layout, layer fits exactly in layout. Is this then impossible to pan or to downsize, because if so, layer would leave blanks spaces all around.

    Layer enlargement is possible until a certain point.

  • emoaeden & LittleStain

    Oh, about scale, I mean that the layer should be enlarge above a certain size and be pinched under another one.

    And about "layout constraint", I mean that I would like to avoid empty spaces around layer when it is downsized.

  • LittleStain

    Thanks for the suggestion.

    This exemple is nice ! But How do I prevent the layer to move out of the layer and how do I implement max/min zoom range ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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 !

  • 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 !