Jump to content
  • Advertisement
Sign in to follow this  
fguihen

how to look directly down on my mesh

This topic is 5126 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 loaded a mesh,and it is at 0,0,0. now i want to look directly down on it from above, but whatever i try doesnt seem to work. anyone any ideas where i position the camera and what target i set it to look at

Share this post


Link to post
Share on other sites
Advertisement
In DirectX

Place the camera above the mesh, make sure it is above the mesh.
Make sure your mesh is not so huge that most of it is clipped.
Point your cameras direction vector down (0, -1, 0)
Point your camera's up vector orthogonal to the direction vector, or strange things will happen, for example (0, 0, 1).

If you still can't see anything, make sure your matrices are in the right order. Use the world to position the object and the view matrix for your camera.

And...

To point the camera in a direction rather than than setting it a target, simply add the direction vector to the cameras position, and use the result as your lookat point.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!