Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

3D view: exact coordinates?

This topic is 5551 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'm developing a 2D game, but the tiles and all other art will be rendered in 3D. I want the tiles in an isometric view, but instead of the tiles being symmetrical, I want it sort of 'twisted.' What I mean is: a normal isometric border has its lines at a slope of .2 My tiles are going to have slopes of .4 and .1 My question is... what are the exact X, Y, and Z coordinates that I can position a camera at, so that it will view a 50 x 50 tile with slopes of .4 and .1? A picture of what I want the result to look like was done in MSPaint just to help you understand. The top one is a normal isometric tile, and the bottom is what my tiles are going to look like. Edit - I forgot to mention that the camera viewing the tiles and other models is in orthographic mode, so that takes out the whole perspective section. [edited by - Faze on March 6, 2003 11:26:06 AM] [edited by - Faze on March 6, 2003 11:23:57 PM]

Share this post


Link to post
Share on other sites
Advertisement
You''d find this a lot easier if you worked with rotations instead of translations :-)

Rotate about the up axis by an angle corresponding to the slope you want, then rotate about the right axis to look down onto the tiles.

If you *must* use translations, then you need to position your camera at an offset corresponding to your slope. ie.

cam.pos.x = target.pos.x - (dist);
cam.pos.y = target.pos.y + height;
cam.pos.z = target.pos.z - (dist * slope);

then do your look-at-target code.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!