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 3D coordinates of floor from screen

Author
Message
SmileSlime
6
Years of Service
User Offline
Joined: 10th May 2017
Location:
Posted: 27th Oct 2017 05:39 Edited at: 27th Oct 2017 09:12
In a 3D dimension(Y being the height), lets say there's a floor. If I click anywhere on the floor, it translates the position of the mouse cursor to the exact 3D X Y Z coordinates of the place I clicked on.

I tried Get3DVectorXFromScreen,Get3DVectorYFromScreen,Get3DVectorZFromScreen, but I do not know how to translate that to the 3-Dimensional coordinates.
I love games, who doesn't?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 27th Oct 2017 12:28
this example should help you.
(it need 2 images)
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.9.3) Radeon R7 265 : Mac mini OS High Sierra (10.13)
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 27th Oct 2017 21:32 Edited at: 27th Oct 2017 21:33
Quote: "to the exact 3D X Y Z coordinates of the place I clicked on.
"


your y value is the y position of the floor, x and z = end_x# and end_z#

Login to post a reply

Server time is: 2024-04-25 07:26:19
Your offset time is: 2024-04-25 07:26:19