OCESS / orbitx

Rewrite of OrbitV, maintained by Patrick, Gavin, and contributors
MIT License
10 stars 18 forks source link

fix those trails yo #47

Closed pmelanson closed 5 years ago

pmelanson commented 5 years ago

Oops we broke trails. Trails are now drawn relative to the camera centre instead of the reference, which is bad because we are usually controlling the habitat while it's the camera centre, and we want to see how its moved.

Trails should:

show how the habitat moves relative to the reference object (usually Earth) even when the habitat is the centre.

pmelanson commented 5 years ago

Oh by the way @sh32kim, commit eee861761144402a7d9c21b89ba349d28ba8b78f is probably relevant to this issue.

In that commit, I made the entity that the GUI uses as the origin of the camera coordinates system (self._origin) be the same as the camera centre.

This means that the camera centre doesn't give a trail. So if we centre on the habitat, the habitat won't give us a trail. But if we centre on the Earth, the habitat will leave a trail.

I made this change so people don't have to worry about keeping the origin of the camera coordinates close to the camera centre, so that the object at the camera centre is always rendered as perfectly as we can and not jagged (which happens if the camera origin is too far away from the camera centre).

The side effect is that trails aren't left behind by the camera centre.

Ping me if you want clarification for why this is.