# 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.

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).

thanks.

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.

##### Share on other sites

Not that I know of, but you could make a new BABYLON.AbstractMesh(); and make it the ultimate parent of the sun and the constellations. You could of course also rotate the camera with the right alpha and beta value.

##### Share on other sites

@Gijs is correct. Just add a root node and rotate it

##### Share on other sites

thanks,

so much easy solution I didn't think about it :-D.

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.