# Thread: How to Obtain x,y,z Coordinates from a 3-D space?

1. Member
Join Date
Dec 2011
Posts
31
Rep Power
0

## How to Obtain x,y,z Coordinates from a 3-D space?

How would I go about creating a method of obtaining the (x,y,z) coordinates from a 3-D environment? I'm developing a 3-D game, and was wondering about a couple of things.

I was gathering normal x,y pixel locations while moving around in the game in FPV and encountered weird results.

2. Moderator
Join Date
Jul 2010
Location
California
Posts
1,641
Rep Power
9

## Re: How to Obtain x,y,z Coordinates from a 3-D space?

x,y,z coordinates of what?

3. Member
Join Date
Dec 2011
Posts
31
Rep Power
0

## Re: How to Obtain x,y,z Coordinates from a 3-D space?

x,y,z coordinates of pixels (voxels?) in the 3d environment.

4. ## Re: How to Obtain x,y,z Coordinates from a 3-D space?

Since the screen is only 2D, to get 3D coordinates I'd think you would have to build a complete 3D representation of what you want to be the 3d environment. Past of that should be a way to get a x,y,z value for a location.

5. Member
Join Date
Dec 2011
Posts
31
Rep Power
0

## Re: How to Obtain x,y,z Coordinates from a 3-D space?

Well if it isn't norm, my favorite moderator. :)

I've got the 3-D environment created, camera actors,velocities, and angles made out but I didn't use any java for that. I was looking at the java 3D library API though,
Java SE Desktop Technologies - Java 3D API

6. Moderator
Join Date
Jul 2010
Location
California
Posts
1,641
Rep Power
9

## Re: How to Obtain x,y,z Coordinates from a 3-D space?

A 2D coordinate can have virtually an infinite number of 3D coordinates. From recollection, this is usually done through picking in which you pick an object in the 3D space based upon the 2D coordinate - since translating the objects from 3D to 2D is done with the drawing, the reverse can be performed to get the picked object. Many 3D librarys have some type of picking support.

7. Member
Join Date
Dec 2011
Posts
31
Rep Power
0

## Re: How to Obtain x,y,z Coordinates from a 3-D space?

Thanks.
I think I'll just have to get the right transformation matrix for the model.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•