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.

Newcomers DBPro Corner / how do i convert 3D coords to 2D coords?

Author
Message
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 23rd Jul 2004 06:43
how do i convert 3D world coordinates to 2D screen coordinates?

Thanks anyone who will help

Tiny Kitten Software -
http://monz.adsl.dk/tks/
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 23rd Jul 2004 07:01
Probably not very helpful, I'm new to this, but couldn't you just set all y values to -y (because the y-axis is inverted in 2-d), and get rid of all z values?
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 23rd Jul 2004 07:11
Lookup the commands

object screen x
and
object screen y

they return the screen coords of an object on screen


Boo!
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 23rd Jul 2004 18:12 Edited at: 23rd Jul 2004 18:14
What i'm trying to get the 2d coordinates from is a particles. Because i want to use it as an explosion effect in my 2d tank game.
I dont think i can use the OBJECT SCREEN X or OBJECT SCREEN Y with a particles

Tiny Kitten Software -
http://monz.adsl.dk/tks/
Sparda
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location: Pacifica
Posted: 23rd Jul 2004 23:02
Yes, you will not be able to use the object screen x() and object screen y() commands since they do not reference particles.

Why not then make a dummy object that is invisible and just position it at the particles position. Then you can call the object screen x() and object screen y() of the dummy object.

gl and hf

Login to post a reply

Server time is: 2024-09-22 17:30:41
Your offset time is: 2024-09-22 17:30:41