Something that comes up a lot when I’m coding is the replication of existing features. Or more accurately, taking something that I did a while ago for a one-off instance of something and trying to replace it with a better, cleaner version for reuse in something else. The most recent example of that is the Blitz’s main cannon.
The Juggernaut already has a tank-style cannon mounted on its trailer that can rotate toward its target independently of the vehicle itself, so I had the basics to build from when making the Blitz. However, I wanted to write the new version in a neater and simpler way to hopefully replace the Juggernaut cannon when it was done. Of course testing new ways of doing something inevitably leads to new problems.
Well, new versions of old problems in this case that brought back memories of making the Juggernaut for the first time. I’ve been dealing with the mildly entertaining (but still frustrating) issue of “helicopter tanks”. That is to say when the turret attempts to turn toward the target it just continues to turn in one direction regardless of which direction is the quickest way to turn. Worse still they keep spinning even after they find and point towards their target, letting off the occasional shot when briefly pointing the right way.
I finally fixed the issue (I accidentally added a full rotation somewhere instead of subtracting half a rotation) so they’re not spinning out of control anymore. I’m kind of disappointed in myself for not recording any of my tests to show you, so I’ll try to remind myself to do so for any future entertaining glitches.
That’s all for now. Sorry for the wall of text, but hopefully it gave you a little insight into the kind of things I’ve been working on. Thanks for reading! –David