Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / getting correct xy of pointer when using Zooming in or out

Author
Message
haliop
User Banned
Posted: 7th Dec 2013 18:16
any suggestions?

i have this:



and now i want to zoom in or out using SetViewZoom(XXXX) command
but then i dont get the same results when trying to place a cube..
im sure someone already answered it here somewhere but i could not find it ...


thank you for your time.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Dec 2013 18:29
Well, if you zoom by a factor of 2.0, you divide the pointer location by 2.0. - so I think you can just divide the pointer position by the same value that you set the view zoom. Then, you probably have to adjust for the view offset as well.

I am the one who knocks...
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 7th Dec 2013 18:43


My hovercraft is full of eels
haliop
User Banned
Posted: 7th Dec 2013 19:19 Edited at: 7th Dec 2013 19:24
Van B i tried it but it didnot work well...
i\'ll try now lilpissywilly suggestion and see..

thank you for your comments.

Lil thank you, it works great.
kinda missed that command in the document...

Login to post a reply

Server time is: 2024-11-24 23:44:23
Your offset time is: 2024-11-24 23:44:23