Hello, this is my 3rd post for this month for Team Terror Forge. This week, I focused on developing the enemy chase state for the project. The primary objective was to ensure that the enemy could detect and pursue the player effectively. To achieve this, I worked on implementing the logic for enemy sight and conditions in which the chase would be initiated I also added an animation to the enemy since I'm closing in on getting it fully working.
So the first issue I encountered was the enemy not being able to see the player for some reason when casting the ray cast from the enemy to the player the ray cast was coming from the enemy feet. This caused a lot of problems one of them being the enemy couldn't see the player and the other being it was seeing things it wasn't supposed to like the floor. I had this issue in my previous implementation of The Enemy and went back to some old guides and researched some stuff on how ray casts worked and gave my enemy AI a position on its head for which I set the ray cast to come which fixed my seeing issue.
The second issue I ran into was the enemy not chasing the player. I wasn't sure why the enemy wasn't chasing the player so I spent a lot of time debugging my seeing code and chase code, I created a dummy object and tagged it with the Player to see if there was an issue with any of those functions I had and it wasn't my enemy went straight to the dummy object I had which then I was even more confused and happy that it wasn't anything wrong on my part of my code I did some more debugging and came across the player list we have of how many players were in the game and found out there was only one which was my dummy object every time I started the game this It was a huge find because it meant the entire time the enemy wasn't seeing the player was because it wasn't on the list I plan on fixing this issue soon.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.