Jump to content
  • Advertisement
Sign in to follow this  
sajis

OpenGL Solar system in VR

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

Hello forum,

I am trying to port a simple OpenGL application in VR juggler. But the issue is related to some of the basic OpenGL concept and i am looking forward to some hint on these.

In this simple OpenGL application i have a sun in the center, the earth rotating it and in turn the moon rotating the earth.


I have drawn a line into the scene which acts as a virtual wand. With this wand i can do intersection test with different planets. For example, for certain orientation if the line ray intersects the moving earth, the earth is rendered with different color and it is working fine. The key press event is used to transform the line ray location.

Now if you select any planet while intersected, you can do further operation over it, for example translating the planet while the line ray is translating. This is where i got stuck. Since the initial scene is translated to -200 , the translation of the planet is not percieved that much comparing to the translation of the line ray. So i was thinking of something else.

1. Once the the planet is intersected and selected, we decide which operation to do over it. For example, i decide translation. So it means that the planet will move in the direction where ever i move the line ray. In that case the animation rotation of the earth around the sun need to be stopped. The planet need to be translated to the one end of the line ray and move along with it where ever i move it with key press event. The rest of the animation , for example moon rotation remains the same. Any suggestion to get it done ?


Regards
Sajjad

Share this post


Link to post
Share on other sites
Advertisement
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!