The Problem
A lot has changed since the last post. Our little team of two developers how now expanded to a team of 5. As a result, internally, we did some role shifting. For the remainder of the our games development, my sole focus will be to design the enemy AI. This in turn is going to be no easy feat. I was doing the math and essentially I have to now generate 15 different enemy types and 3 bosses. That means 18 different models, 8 different combat styles and effects, spawn logic, aggression logic, the list goes on. In order to maintain some level of mental clarity, I decided to start small. The goal was to get a single enemy into the game fully working with animations and combat logic. How hard could that be...
Hard... hard is the correct answer.
So here's the skinny. I tried to be clever by half and import an old AI system from another project I was working on. Simple enough, right? Nope, turns out, there is a bug hidden deep with in our project that will literally crash at the thought of the Manny asset. An asset pack that comes standard with the Unreal Starter content go figure. What does that mean to me? That means I now I have to go find a new model and start from scratch, acquiring new animations, adding in new anim notifies, etc etc... So that 's what I did! I found a cool looking knight model and imported him into the game, no issue. Or so I thought...
<Reference image of the base model. Hard to see but they are the tiny guys next to the player>
Turns out the models scale was set at like 1/10 the actual size, great... So , I did what any hard working game developer would do, cry for about 15 minutes, then launch blender and attempt to fix the scale. In blender, I saw that the scale of the object was set to 0.001. In my mind I thought, "Ok well if its set to 0.001, maybe resetting it to 1.0 will fix this". And that's what I did. I set the models scale to 1.0, exported the model, loaded into blender, did some small tweaks to the code, and launch the game. In hindsight, I think I went a little too far...
<Reference image of the model after adjusting the scale>
The Solution
So, I didn't actually solve my problem... I only kind of did. Between tiny people and giants, I decided to simply scale the mesh within unreal. Simple enough. When I restarted the game, everything looked great! The enemy AI scaled correctly, the model looked great, but at the same time I couldn't shake this feeling that something was still wrong. As I am examining the model, I decided to agro the enemy AI to confirm that both the enemy logic was intact and that the animations were working. That's when my next problem arose...
It turns out, if you scale a model that has something attached to it, in this case a sword, the sword also scales with the model, distorting the location of the sword. Not ideal, but at least its a start in the right direction.
All and all, what does this mean? This means that A) I have a functionally enemy AI that will execute attacks on the player and B) I need to figure something out to get the sword issue figured out. Its a bitter sweet end to a bitter sweet week.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.