Jump to content
  • Advertisement
Sign in to follow this  
gusso

representing 3d coordinates on screen

This topic is 3409 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a bunch of origins and a view vector for the player, what should I do to represent each origin on the player's view? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by gusso
I have a bunch of origins and a view vector for the player, what should I do to represent each origin on the player's view?

Thanks.
Can you be more specific? What do you mean by 'origins'? And what does it mean to represent an origin on the player's view?

Share this post


Link to post
Share on other sites
The origins are the "positions". I'd like to project them onto the player's view vector so that I can display each origin as an image on screen where the actual objects are.

Share this post


Link to post
Share on other sites
Quote:
Original post by gusso
The origins are the "positions". I'd like to project them onto the player's view vector so that I can display each origin as an image on screen where the actual objects are.
Well, the usual way to display an image on screen where the actual objects are is to render the images where the actual objects are.

I'm guessing though that what you're really talking about here is some sort of UI element, where a 2-d image is displayed relative to the screen-space position of some object. Projecting onto the view vector doesn't have much if anything to do with this process - I think what you're really looking for is something like gluProject().

Also, using the term 'origin' in this context is kind of confusing. 'Position' would probably be more appropriate. ('Origin' usually refers to a point of reference, usually the zero vector.)

Share this post


Link to post
Share on other sites
Tomāto - Tomäto.

I just wanted to know how to display this objects from the player's view so that I can overlay certain information such as health and orientation for instance. I do not have access to the code and I'm displaying on top of the screen.

I don't see how assuming I'm using OpenGL makes things any better really, in fact I'm not using anything but GDI and the original program uses D3D. I don't have any viewport matrices or anything to project but origins and a view vector. (and to me origin is the correct term since they are in reference to the center of the map...)

Share this post


Link to post
Share on other sites
Quote:
Tomāto - Tomäto.
In both math and programming, using appropriate terminology is an important part of communicating your ideas clearly. In these fields, 'tomāto, tomäto' applies less often than you might think.
Quote:
I just wanted to know how to display this objects from the player's view so that I can overlay certain information such as health and orientation for instance. I do not have access to the code and I'm displaying on top of the screen.
If you don't have access to the code, what do you have access to? How exactly do you intend to ascertain the world-space positions of these objects?
Quote:
I don't see how assuming I'm using OpenGL makes things any better really, in fact I'm not using anything but GDI and the original program uses D3D.
I didn't assume you're using OpenGL. I suggested that what you're looking for is something *like* gluUnproject(). (Other APIs have similar functions.)
Quote:
(and to me origin is the correct term since they are in reference to the center of the map...)
Again, in math and programming it doesn't really work to re-define common terms in ways that make sense to you personally; it'll confuse others and make it harder to communicate your ideas.

Now, it may be the case that your understanding of the term 'origin' is correct and I'm the one who's mistaken. Thus far though, I'm just not seeing how your use of the term conforms to the generally accepted meaning.

Share this post


Link to post
Share on other sites
I can't, it's for an ESP type of display for an already existing game. It's supposed to display certain information that the game currently only shows if you have a window opened, which needless to say it's a design flaw.

Things I do have access to:

1) absolute positions of the players (including my own)
2) the players view vector (including my own)
3) the screen rect
4) realtime origins of the players (relative to the current node they're standing on?)

I think I'm missing the camera information and with that I could unproject the coordinates, right?

Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!