With the initial versions of the Mini-Tumbler model now in the test environment, I'm continuing to develop the mini-tumbler AI which will control the mini-tumblers and how they will behave in the game.
How it works:
The original AI script for the mini-tumblers, which was used in the previous build of the game will control how the mini tumbler enemies will interact with the player in the game. In addition to the Idle & Chase states of the mini-tumbler AI which I mentioned previously, hit detection has been added as an additional feature.
Hit detection is managed by the mini-tumbler AI script checking every frame for any object collisions with the object mesh during that frame. If an object has found to be colliding with the mini tumbler, the script will then check the properties of the colliding object and check if it has been tagged as a "projectile" object. If so, this means that the mini tumbler has been hit by a projectile fired from the player during an attack and will need to react accordingly. After executing this check, the script will then deduct a portion of the tumbler's HP from it's health parameter and also execute a 'knockback' function where the mini tumbler will move back slightly to indicate it's been 'knocked back' from the impact of the attack.
When other attacks have been added to the player character, hit detection for the enemy characters will then be updated to check for hits from these new attacks as well.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.