Jump to content

What happens when you change to map view / planetarium


Recommended Posts

I am struggling a bit to understand what is going on when the game flips to map view while in flight, in terms of the rendering etc. Are there two scenes set up, and different cameras areturned on and off? Do all the gameobjects that make up the craft still exist while we are looking at the map? Do the cameras all still exist? What does the game do to the cameras and objects when you move between the two?

My problem is that I have added an extra camera while in flight, which works as I want it to, but when I change to map view and back again it is not rendering the things I want it to. I have tried to check to see if my new camera has been somehow disabled, bu I am not having much luck. Does anyone have a full understanding of what all the different cameras are in stock, and what they are used for and how they are turned on and off?

Link to comment
Share on other sites

Does anyone have a full understanding of what all the different cameras are in stock, and what they are used for and how they are turned on and off?

I'm afraid I don't have a complete understanding, but somethings I do know. objects in mapView are positioned in ScaledSpace and there are in fact different cameras used. For the flight GUI, there's also a third camera as far as I've been able to discern.

The three cameras you're looking for are:


FlightCamera.fetch.mainCamera;
ScaledCamera.Instance.camera;
ScreenSafeUI.referenceCam;

Whether ScaledSpace is actually a whole other scene, I don't know. Others might be of more use to you there.

Maybe you'll be able to gleam the rest of your answers from the source of the hullcam mod.

Link to comment
Share on other sites

Thanks, that is really helpful. I was using Camera.main as a reference the location of my new camera, which works to start with, but once you have moved to mapview and back, it seems to have changed to be a different camera (hence my new camera ends up in the wrong place pointing in the wrong direction!) Using FlightCamera.fetch.mainCamera (well I have not tested that yet, but it sounds promising, I have tested with FlightCamera.fetch.cameras[0]) seems to have solved my problem.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

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

×
×
  • Create New...