How do I fix my zoom

Just started using Construct 2? Post your questions here

Post » Wed Jun 01, 2016 3:34 pm

Hi!

I've looked and tried all the examples and suggestion in the forum but... I'm missing something!

For sure there is a very dumb error somewhere but it seems that my zoom centers itself always in the same place, and I cannot see where my error is... can anybody help, please? :)

Many thanks in advance.

https://www.dropbox.com/s/wzz96b0ns77k1si/TestZoom.capx?dl=0
Last edited by JeffSkyrunner on Wed Jun 01, 2016 3:46 pm, edited 2 times in total.
I'm not a insane, my mother had me tested

I'm an engineer. To save time, just assume I'm never wrong
B
30
S
13
G
4
Posts: 141
Reputation: 4,832

Post » Wed Jun 01, 2016 3:41 pm

@Jeff Skyrunner - Link is broken.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,857

Post » Wed Jun 01, 2016 3:43 pm

@chadorireborn

Link fixed, thanks
I'm not a insane, my mother had me tested

I'm an engineer. To save time, just assume I'm never wrong
B
30
S
13
G
4
Posts: 141
Reputation: 4,832

Post » Thu Jun 02, 2016 3:27 am

@Jeff Skyrunner - Sorry for not replying early. Firstly, I fixed the local variables you had since they are not checked with "static" which will make it persist when you set it. Secondly, since your scroll + lerp is on a function so it will not work that's why I made a variable named "IsZooming" to make it zoom in every delta time. Remember lerps don't work with functions or triggers. Thirdly, I changed your UI from scale rate of 0 to 100 since I don't see any point of setting it to 0 for it is never set to change but I did change it's parallax from (100,100) to (0,0) since it is a UI and UI's work that way. BTW, I think you should resize your window size into something smaller and avoid box window sizes for wider range of compatibility with devices.

Also, remember to remove third party plugins/behaviors when you post in the forum but if it is necessary then please direct a link to it.

Fixed .Capx : https://1drv.ms/u/s!AjcW2ueud6qpoScBcR5abOTAWDl6
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,857

Post » Thu Jun 02, 2016 11:44 am

@chadorireborn

My first thought this morning, even before coffee was: "Damn! I forgot to erase all plugin references!"... sorry for that.

Many thanks for all your hints! I'm trying your version, but still it seems to me that it zooms always with the same center... or, at least, it doesn't have the camera always as its center. What am I missing?

I am sorry, but I am always been a "back end" developer, so I still have to grasp all this "fron end" issues...

Many thanks in advance.
I'm not a insane, my mother had me tested

I'm an engineer. To save time, just assume I'm never wrong
B
30
S
13
G
4
Posts: 141
Reputation: 4,832


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests