Devlog 3 : animations and enemy ai
This week the game combat has taken shape. With our newly imported player model from last week we have created an ensemble of player animations as follows. -Idle -Walk
-Sprint
-Roll
-Light Attack
-Heavy Attack
-Special Attack
Along with these animations the player combat script has been updated with attack triggers which play the attack animations while also affecting values in the player movement accordingly. Such as stopping the player moving while performing an attack.
Also added in this week was the enemy pathfinding and detection code. The pathfinding and movement code for the enemy uses unity’s NavMeShAgents. The enemy detection uses a combination of calculating player distance and then using raycasting. In layman's terms, once the enemy is within range of the player the raycast system is active, if the raycast hits the player then the detection code will tell the pathfinding to move towards that position. A few other features added onto this is the “last seen” and “chase” code. What this does is the enemy will move towards the position that it last saw the player, this way the enemy cannot track the player around walls. The “chase” system will track the amount of time the enemy is following the player, if it exceeds the time limit the enemy will return to their original position after waiting at the “last seen” position for 5 seconds. Lastly the enemy model and animation rig were implemented. Only four basic animations were needed for the first enemy, idle, walk, attack and death.
Get First Spawn
First Spawn
A short soulslike game
More posts
- Devlog 13 : final preparations for deliveryJan 09, 2023
- Devlog 13 : finishing touchesJan 09, 2023
- Devlog 12 : christmas and animationJan 09, 2023
- Devlog 11 : content completeJan 09, 2023
- Devlog 10 : beta build preparationJan 09, 2023
- Devlog 9 : alpha build preperationJan 09, 2023
- Devlog 8 : second external playtestJan 09, 2023
- Devlog 7 : first external playtestJan 09, 2023
- Devlog 6 : first bossJan 09, 2023
- Devlog 5 : enemy ai expandedJan 09, 2023
Leave a comment
Log in with itch.io to leave a comment.