How do I zoom to a point of a sprite, with changing origin?

Get help using Construct 2

Post » Wed Feb 10, 2016 5:44 pm

Hi,

i would like to change the origin of a sprite, but in an appli, for zooming on this point.

i try Hotspot, but i can only clic a time. At the second clic, nothing happend.
i add two slidebars to change origin and all is good.
I don't understand why it'wrong with clic on sprite.

here is a capx.
http://svt.dahu.free.fr/zoom/zoom3.capx

An idea please?
B
9
S
1
Posts: 72
Reputation: 631

Post » Thu Feb 11, 2016 6:50 am

I didn't look at your capx but, if I understand you correctly, you should scale the layer

System > Set Layer Scale ( for zoom )

and use

System > Scroll to postion > sprite.X, sprite.Y ( to zoom to specific point )
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Thu Feb 11, 2016 1:35 pm

Thank's for your answer but it zoom on the default origin of the sprite, without change this origin when i clic on a specific point of the sprite.
B
9
S
1
Posts: 72
Reputation: 631

Post » Thu Feb 11, 2016 2:28 pm

I'm unable to open your capx, seems to be something wrong with the "sprite"-plugin (Did you edit it?)

You can't change the origin of the sprite, but maybe you could calculate the offset of mouse.x,mouse.y to the origin on mouseclick and use that as your center for zooming?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Feb 11, 2016 3:27 pm

Message: dahu can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi!

my capx don't open because i use an other version of the plugin "sprite", which integer an action "hotspot".
( http:[email protected]/zoom/sprite.zip )

i'll try with your idea but i don't know how center for zooming to a specifix point.
B
9
S
1
Posts: 72
Reputation: 631


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests