Problems with AI and sockets for animation
Author: Matthew Fox
Between the week start and end, I was tased with completing more of the AI for our enemies. The Ai functionality I have now is pretty basic, but it did come with it's own set of problems. As I made the AI, I had to stop and think. This is a pretty basic AI, but I need it to work in tandem with a lot of other systems such as weapon attacks and health. I ended up not going with any of the attacks quite yet, but I do have the functionality there and ready whenever the combat system is imported. As of now, our AI can randomly move around the mesh, as we started last week, and now, it can get the name of the player characters, and soon will have team functionality. Right now, the only thing that is on the side of the main player is the pirate class, so I have it set to whenever an AI has sensed a player enter it's cone of vision, it will follow them and move to melee range. Pretty basic stuff, but it took a while to make it run properly in code. I could have done it in blueprint a little easier, but where's the fun in that? Below is some code I wrote for this perception code, lets take a look!
Moving on, I also was tasked with a lot of the art associated with Handcannons and Cutlasses, and because of that, I felt it was necessary to add some stuff to our player character sprite, mostly sockets for our weapons and items. However, this still poses an issue, and you'll see what I am talking about later. As of now, the pirate spawns in with his very own cutlass! A separate entity from the character, as we will be wanting to change things over as we move along. To do this, I went through all the animation frames from our flipbook asset in PaperZD, and added sockets to the hands. Now, wherever the weapon is being held, the player will look as if they are holding it properly! Only when the left hand is visible, however. Although this was not intended, the pirate holds the blade in his left hand due to something with the camera being slightly off, but we worked around it no problem. When the player turns to the right, you'll still see the blade in all its glory. That can't be right! Our player holds his sword in the left hand! It shouldn't be visible. I am still attempting to debug this, and I do believe it has something to do with the blades orientation inside of the blueprint itself. Here are some screenshots to end my post, and if you have any suggestions, leave them below!
Hand Cannons & Cutlasses
Status | In development |
Author | SanityStudios |
Genre | Action |
More posts
- AI Development in Unreal Engine72 days ago
Leave a comment
Log in with itch.io to leave a comment.