Effective day.
|
Been really efficient today, i got plenty of tasks done. Smaller tasks than the ones on Asana but still got them done. First i worked on implementing the aiming system i worked on yesterday to all the spells, turns out you need to add the original position to the directional vector(times the travel distance of course) in order to find the end location for the spell. Anyways all spells now uses the object reference found in the player class as their target if applicable. Next the AI was working incorrectly by moving back and forth as if finding new targets. I prepared to do some mayor reworking on their behavior tree but luckily i realized that the destructible objects on the level had the same collision type as the player (Pawn) which made them applicable targets for the AI’s AggroCheck. After a quick edit in that the Ghouls started behaving properly again. Except they kept spawning in higher number than they should. I intended for them to spawn once per second until there were more than ten of them in play at once. However, the amount of ghouls kept increasing over time. After a lot of debugging i realized that the number of enemies alive was decreased when a ghoul took damage and their health was below zero. Unfortunately, the ghouls would still register this even if they had been hit below 0 HP but not de-spawned yet. After fixing this issue the ghouls resumed spawning in the correct numbers. Next up i made a custom TargetPoint class which i attached as children to Destructible objects and ghouls. This was then set to be the class searched for in the auto aim functionality for the spell casting section of the player class. This way the player can target any object with a child object of this class and not just the generic destructible object i used before. Finally i also managed to solve the issued with the player’s dash function by modifying the input values used in the interpolation. I would write more about it but i pretty much just threw the values around until i found something that worked. |