In these 4 hours, I have made the overall experience of switching between objects better by doing these things:
- Made the camera turn with constant angular speed. Previously, it would sort turn instantly if it needed to make a 180, and then freeze.
- The camera position is now smoothed out with an easing function instead of linearly moving it
- Made the grid in the background not jitter when viewing a single planet
- Set up debugging to work
ㅤ
The reason this took this long was because for some reason, I was previously using the frame count and a decimal calculated framerate to time out the animations.
ㅤ
Obviously, mixing decimal numbers with whole numbers wasn’t going to work well, so I had some really weird bugs that sometimes happened and sometimes didn’t. This was literally the motivation for me to setup the debugger!
ㅤ
Initially I tried to work with the system as it was, but it became tedious fairly quickly, with a lot of if statements, etc. So, I swapped to just using the system time, and it literally just fixed itself almost instantly! That and the code for it ended up being simpler than before!
ㅤ
The only thing I don’t really like is the grid, and how it kind of jitters, although that will a future problem to solve.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.