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 / function to get the pointer on WORLD coordinates (rather than screen) possible?

Author
Message
Raizzan
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location:
Posted: 30th Nov 2015 12:22

hey guys , the last 2 days im stuck with a specific problem.
id like my game to have a zoom function - and id like to "touch" world objects
therefore i need to get the coordinates of the pointer in world coordinates (rather than screen)
i tried a couple of functions which are incorrect...

(wrong)
GetPointerX() * (1/GetViewZoom())

perhaps you guys could help me? :/
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Nov 2015 12:40
please try this if it works with zoom
WorldToScreenX ( x )
WorldToScreenY ( y )
ScreenToWorldX ( x )
ScreenToWorldY ( y )
AGK (Steam) V2.0.15d : Windows 10 Pro 64 Bit : AMD (15.201.1151.0) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Raizzan
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location:
Posted: 30th Nov 2015 16:35
it works bro....
it works....
thanks

Login to post a reply

Server time is: 2024-11-17 00:40:04
Your offset time is: 2024-11-17 00:40:04