I have the mantis mostly completed:
I painted it red which I thought might be cool but really its just giving christmas vibes:

I definitely need to do another paint pass, also having nothing ontop of that pillar seems kinda crazy. The smoothness of that intersection leaves something to be desired, maybe a wire or some kind of power…pack…thing?
Finally as you can tell from the video the mantis stays still unless turning towards the player. The turret at the top is on its own aiming system. I’m not a fan of the turning on the body front, I have to figure out a way to lock the movement of the turret periodically. To demonstrate what I mean:
The turret looks like its skating across the floor, the patrol bot has this also but its on such a smaller scale it’s harder to see. I’ll definitely need to make some kinda scheme to stop movement on certain frames on animation.
So the gun on top of the turret aims in both azimuth and elevation. Both are controlled from the pivot point on the bottom of the gun. Originally I had everything inside a control rig across two different controls, but that proved to be pretty painful as gimbal lock would mess with everything. Instead of fixing the gimbal lock problem I basically ignored it and disabled the yaw control in the rig for pitch control only.
Which I think the springiness looks pretty cool, however this gives a different problem. If I just said “player is at 10 degrees from the tip of the barrel, turn bottom to 10 degrees” the barrel would never really point at the player. It would have some kind of vertical offset, then you might think “this is a trig problem!” however you miss one of the key side distances, because you’re not really sure what you need to set the angle to…. I tried drawing below what I’m talking about:

This is one of those things that it REALLY feels like I’m failing at some simple trig here. After making a few attempts myself I gave up, started consulting AI to see what silly mistake I made…it turns out I made a classic Inverse Kinematics problem by doing something a stupid way.
You essentially can’t figure this out with a systems of equations or any kind of trig because you don’t have that goal distance to the target. So in this case you need to basically keep guessing and checking the answer to converge on the proper value. Now writing this out I feel kinda dumber HOWEVER the only other way you could really do this is by making individualized animations for each position, knowing what the aim angle is at each position by per-calculating (a look up table of model poses).
Anyways here’s the rough algorithm:

Basically:
1.) Take your current elevation and determine how far your off on your Z plane and how far off you are on your XY plane (technically this is wrong but I can get away with it because my robot it always correcting azimuth, also its left hand XYZ if anyone is keeping up).
2.) Calculate what theta might be if we took the error distance and made an angle guess for the pivot point
3.) Run the algorithm again to further update theta.
So now I have a gun that tracks your elevation and azimuth.
On the actual game side I’m trying to figure out what I want the worlds to be, I think I’m leaning towards 90s fps alleyways more so than the destroyed corporate buildings I was going with. I started making a kinda warehouse level and I think I’m going to trash it:




The scale in generally all wrong (look how small each step is compared to that huge box) but I think iterating is going to be my friend here. Mostly I wanna keep pumping out trash maps for myself, learn why they’re trash, and make another map: rinse and repeat until I get something fun and playable.