Jump to content

How to rotate the entire world (worldmatrix)


Recommended Posts

Hi all,


I have a program here I would like to finish but I have an issue where I cannot find the solution. Let's me explain.

The program show constellation in 3D (here => https://melioratif.github.io/Constellations/) and as it says, it show stars constellations in 3D. (you can play with mouse and key up down, etc... and options, no risks)

My prob is about the rotation mode on only one constellation. If you take the ursa Major (https://melioratif.github.io/Constellations/index.html?const=UMa&cam=rotate&alone=yes&autor=yes). everything is ok. Why, because an imaginary line between the sun( our sun ) and the middle of the constellation is mostly paralell to the x axis of the screen.

but take this one https://melioratif.github.io/Constellations/index.html?const=TrA&cam=rotate&alone=yes&autor=yes.

You see it's like the titanic. And some are worst...

So my question is, is it possible to rotate the entire world (a scene.rotation.x or something like that).

To be complete, the camera is an arcrotate camera. The target is the middle between the sun and the farest stars of the constellation. So I have 2 points O(0,0,0), B(x,y,z) and I want to turn everything in the angle formed by BOA (were A is on an axis for example, (0;0,1). 


IMPORTANTE NOTE : you can play with the program if you want but, if you click on show all stars it will show all stars of the galaxy from the catalog (120 000) it's udge, my  computer (a lenovo yoga ) cannot handle it whithout slowing firefox.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...