Jump to content
  • Advertisement

Archived

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

wazoo69

Need some help with a world object/camera algorithm..

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

Hi people, I''m creating a space game where the player is at the center of the viewport. My objects can fly through the game world fine enough, and collision detection works okay. My main problem stems from an annoyance that I''m not sure how to go about approaching. Once my game world objects hit the edge of the world, they wrap around to the opposite end. That works just fine. My problem arises in the case where the player is chasing an object towards the edge of the world boundary. WHILE the object is in the camera scope, it hits the world boundary, thereby disappearing from the view (as it''s wrapped around to the other side already)...but then reappears as the PLAYER crosses the world boundary.. I want to implement a seamless solution, where the object stays in view of the camera even if it''s crossed a world boundary. Is there any solution to this problem? Can I "fake it" at all by grabbing the view matrix and checking it''s location within the game world? Any help is greatly appreciated..

Share this post


Link to post
Share on other sites
Advertisement
use the location of the player as the center of the world, and wrap things around with respect to her

George D. Filiotis

I am a signature virus. Please add me to your signature so that I may multiply.

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.

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!