net-lisias-ksp / DistantObject

Distant Object Enhancement (DOE) is a visual enhancement mod that makes objects realistically visible over large distances.
Other
10 stars 3 forks source link

Do the blinking stunt for Asteroids #17

Open Lisias opened 2 years ago

Lisias commented 2 years ago

As requested by Fellow Kerbonaty Krazy1 on forum:

One more request... make it work for asteroids. Right now it's showing only a small dot from physics range out to DOE setting for max rendering range. Then it suddenly blinks into full detail at the edge of physics range. With a class A it's probably not too noticeable but a Class E certainly is. It went from about 1 mm diameter white dot to 2 cm full detail as I approached it.

It might be an extra challenge for new asteroids because they are "unowned" and KSP might not even spawn the details of the asteroid until it first enters physics range... just a guess.

Lisias commented 2 years ago

Quoting myself from forum:

Yep, this is going to need a "new engine" for it. Asteroids, as far as I know, are a special kind of "vessel" - AFAIK it's like a debris from the physics point of view. What means it goes to rails and from it - what can make things a bit easier with a bit of luck.

On a superficial analysis, it can make my life a bit easier as I think I can use the OnRails and OffRails events to detect when DOE should draw the blinking lights and when it does not.