Zooming and Pinch to Zoom Open Source

squeeb

  • Posts: 1617
I have pinch to zoom close.. id like to make it open source so we can collectively work on it and make pinch to zoom available to everyone here... i dont have enough time to work out the last kinks..
Ill post my stencyl file in the morning after i get the unnecessary  the code deleted. 
id like to make this a behavior, or have it easily integrated into other projects.
Please let me know who wants to help!! and any questions you may have.

Ill keep a bug list and a best stencyl build in the second post of this thread for others to try as well as help fix.. feel free to post here on what youre working on and post or send me your stencyl files and ill keep it up to date

« Last Edit: February 19, 2019, 11:04:00 am by squeeb »

squeeb

  • Posts: 1617
Pinch to Zoom Current Build 8/7/18


Bugs
Zooming below 1
Prevent joystick  zoom
Prevent Text from  zoom


Sometimes the zoom bounces in and out. << first problem to fix
Figure out how to set positions with zoom involved... i left in some drawing on images code.. it seems to move where youre drawing with the zoom level as well as camera position...
Tiles zoom?
backgrounds dont tile correctly

« Last Edit: August 07, 2018, 07:43:00 am by squeeb »

squeeb

  • Posts: 1617
Extensions used.  Tracing Motions
it may ask for color utilis and easy math.. i dont think i used those
updated 2nd post with the build.. try it and make sure there arent any missing extensions

squeeb

  • Posts: 1617
*crickets!! haha jk...

today i learned that setting anchored positions by screen width/height need to be set at zoom 1.... if the engine zoom is less or more... itll set the position of the screen incorrectly.. the screen size number will change with zoom..  i may multiply by zoom and see if that works later on.... and to set something to center y of the screen you have to take screen height/width x Zoom /2
 here is the fix so far,.i havent added it to the build.. since 0 dls :p


Noroup

  • Posts: 147
Thank you so much Squeeb


colburt187

  • *
  • Posts: 2416
hey Squeeb, great to see someone working on a zoom function. Can this zoom out as well? without having to zoom in first?

squeeb

  • Posts: 1617
Thank you!  Im not sure i understand the question fully.
Zooming out would be setting the zoom attribute less than 1.  You can set that number to any number at any time.  This way of zooming  doesnt need to "prepare" zoom like the old extension

Im waiting for 4.0 build to update this and see what issues it still has. 
Has anyone added anything or cleaned up the code at all?   Or should i use my version still?
Upload here if anyone has worked on this. :D

colburt187

  • *
  • Posts: 2416
Ah right cool. I tried a zoom before in stencyl that only let you zoom in. So if you wanted to zoom out you have to build the game zoomed in then you could zoom out. So if this can zoom out first then that’s awesome.

airman4

  • Posts: 875
Pinch to zoom
Can we use it without pinch and all ?
Like using it with simple conditions like "if" , "always" etc

colburt187

  • *
  • Posts: 2416
Pinch to zoom
Can we use it without pinch and all ?
Like using it with simple conditions like "if" , "always" etc

I have a zoom behaviour you can use, its pretty simple to set up, ill attach the behaviour here tomorrow.

squeeb

  • Posts: 1617
Pinch to zoom
Can we use it without pinch and all ?
Like using it with simple conditions like "if" , "always" etc

I have a zoom behaviour you can use, its pretty simple to set up, ill attach the behaviour here tomorrow.

Awesome!  I havent had much time for this.  Ill have a look also

The zooming can be used without pinch.  It uses the engine set zoom method

airman4

  • Posts: 875
Thanks a lot colburt !!!!
I tried the current zoom extension but it doesnt work at all

colburt187

  • *
  • Posts: 2416
one major flaw at the moment is it doesn't work well with tiles, have you noticed that Squeeb? Maybe Justin can look at that. Currently its working in my game, i'm using actors for the ground.

airman4

  • Posts: 875
I'm using actors too, so i hope it will work for me