Jump to content

[SOLVED] How do I get the celestial body being focused on in the Tracking Station?


Recommended Posts

I want a UI button to do something for a specific celestial body being viewed in the tracking station.
I have the UI code setup but scratching my head on how to determine which celestial body is being focused on in the tracking station.

 

 

UPDATE:

after a few days of trial and error, I've found the answer:

var celestialBody = PlanetariumCamera.fetch.target.celestialBody;

also worth noting that the target can be anything that the tracking station can focus on, so you need to make sure it's a celestial body (or any other type)

var isCelestialBody = PlanetariumCamera.fetch.target.type == MapObject.ObjectType.CelestialBody

 

Edited by Xyphos
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...