Jump to content
  • Advertisement
Sign in to follow this  
pakistanxp

Converting world coordinates to local coordinates

This topic is 5461 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

How do i go about it? i have map created from worldcraft and then parsed in and loaded by my game engine.. i have entities but i want to assign a camera to a particular entity how do i do that? thanks

Share this post


Link to post
Share on other sites
Advertisement
Can you be a little more specific? Your post doesn't match the title you've given it.

Are you trying to convert world coordinates to local coordinates?

Or

Are you trying to create a view matrix based on the position of an entity in your game world? (i.e. the inverse of the entity's world matrix).

Share this post


Link to post
Share on other sites
As long as you know the position of the entity and the direction it is viewing (either by a LookAt point or an angle) you could simply translate/rotate your Camera using the correct Matrix functions, onto the entity (maybe move the camera around a bit, since it would be directly inside the entity)

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!