OrbitLens Devlog #5: Camera panning improvements and performance updates
After the changes from Devlog #4, all the math and the 3d models were
all working but i faced some problems in other aspects of the website.
Here are soe of the changes i made:
Change 1: Correct orientation
This was a small change, but i noticed that some satellites were a
bit too big (like Aqua) and were positioned wrongly, so i just chaged
teh scale and the rotation to make it a bit more realistic
Changes 2, 3, and 4: The camera improvements
I faced a lots of problems with the camera and how it worked. Before,
i couldn’t rotated in all directions around the earth or the satellites
because they were using OrbitControls so i swapped that out with TrackballControls, which allows for 360deg panninh
There was also like a rubber band effect where the camera, when the
camera lock was selected as satellite, zoomed in towards a satellite, i
couldn’t interact with the satellite at all. THis was because as the
satellite’s moving, the camera is also actuvely trying to catch up so it
never actually ‘ended’ its animation so i was blocked from interacting
with the satellite. To fix this i implemented delta tracking. The engine
now calculates the exact mathematical vector the satellite moves every
frame and shifts the camera’s physical position by that exact same
amount, which worked.
Previously, switching targets caused the camera to travel in a
straight line, clipping through the Earth, which looked kinda
unprofessional so I engineered a custom transition that separates the
camera’s direction from its altitude. Now, when you select a new
satellite, the camera zooms out, tracels in a an arc over the globe, and
zooms in to the destination satellite.
The animation still needs a lot of improvement cus some parts are still a bit glitchy, but i’m happy for now.
Change 5:
I implemented it that the TLEs are now stored in the actual
localStorage for like 6 hours and then fetch new TLEs. So the user will
always have the latest TLEs cus they update evey 12hrs.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.