Jump to content

How to hide planets orbits in the tracking station


Recommended Posts

I'm looking for a way to turn off the orbits of the planets, and possibly the little round market overlay on each planet.

Would this have something to do with MapView.orbitLinesMaterial or am I barking up the wrong tree?

To be honest, I haven't touched the API at all yet. Just had a skim through the documentation.

Link to comment
Share on other sites

You shouldn't be touching the MapView.orbitLinesMaterial because it's the global material for ALL orbits.

Instead, you should do this:

In the Planetarium.fetch variable (or .Instance, not sure) there's a property called Orbits. You can iterate through this and find the orbits of the planets you want to hide. You shouldn't outright disable the orbits, because then they won't be updated, and the planets you disable won't move, or just disappear, instead you should try messing with the OrbitRenderer (might be just Renderer) field of the orbit, and set the drawMode field to DrawMode.OFF, or something along those lines. There are many values in the OrbitRenderer and OrbitDriver classes that look like they disable or hide the orbit, but this is the only one I've found that actually works without glitchieness.

Might be some errors in there, I'll update this post when I get home and can look at the assembly browser in my IDE.

Link to comment
Share on other sites

Even better : CelestialBody implements IDiscoverable. So loop the bodies and for each call :

body.DiscoveryInfo.SetLevel(DiscoveryLevels.None);

Play with the value to get the result you want. None hides the planet, Presence should just show that something is here, StateVector shows the orbit, etc ...

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