3rd Person Shooter with FSM based AI
3rd Person Shooter with FSM based AI
A 3rd Person shooter with Ai's implemented using Finite State Machine technique. Designed 8 states for the FSM AI's, Attack, Cover Attack, Suspect, Go-To-Cover, Chase, Patrol, Death, Idle.
The AI's detect players using a sphere collider NonAlloc and uses some defined parameters to determine if the player is in it's range.
Unity Animation Rigging package was used for attaching weapon's to player and also to create weapon animations.
Attack State: AI has detected player and is already in a defined range which it can attack from.
Cover Attack state: AI is currently in cover and it has detected the player while behind cover, it will un-crouch at set intervals to attack the player from behind cover and if the distance between the AI and player is within the specified range it will leave the cover and switch to Attack state.
Suspect state : This state is entered when the player is moving behind the AI at an already defined distance and the sound from the movement passes an already defined threshold, the AI in this state will go the location which the sound threshold was passed.
Go-To-Cover State: AI hasn't detected player but it has taken damage, using the sphere collider it finds the nearest object with the tag "Cover" then calculates the dot product between the direction the damage came from and it's current position, uses the result to select which area of the "Cover" object it will run to and crouch
Chase state: AI has detected the player and the distance to player is greater than it's attacking range, in this state the AI will chase the player till it either gets to attacking range or it loses the player.
Patrol State: AI will move through already specified paths, till it is either attacked by player, or it has detected player.
Death State: AI health has been depleted by player, AI will drop its weapon before its Game Object Set Active property is set to False by the AI Manager script.
Idle State: AI initial state once its Game Object Set Active property has been set to True by the AI Manager script
For optimization purposes the AI Manager script has been designed to only set an AI Game Object active when the player is at a specified distance to the AI already defined position.
A 3rd Person shooter with Ai's implemented using Finite State Machine technique. Designed 8 states for the FSM AI's, Attack, Cover Attack, Suspect, Go-To-Cover, Chase, Patrol, Death, Idle.
The AI's detect players using a sphere collider NonAlloc and uses some defined parameters to determine if the player is in it's range.
Unity Animation Rigging package was used for attaching weapon's to player and also to create weapon animations.
Attack State: AI has detected player and is already in a defined range which it can attack from.
Cover Attack state: AI is currently in cover and it has detected the player while behind cover, it will un-crouch at set intervals to attack the player from behind cover and if the distance between the AI and player is within the specified range it will leave the cover and switch to Attack state.
Suspect state : This state is entered when the player is moving behind the AI at an already defined distance and the sound from the movement passes an already defined threshold, the AI in this state will go the location which the sound threshold was passed.
Go-To-Cover State: AI hasn't detected player but it has taken damage, using the sphere collider it finds the nearest object with the tag "Cover" then calculates the dot product between the direction the damage came from and it's current position, uses the result to select which area of the "Cover" object it will run to and crouch
Chase state: AI has detected the player and the distance to player is greater than it's attacking range, in this state the AI will chase the player till it either gets to attacking range or it loses the player.
Patrol State: AI will move through already specified paths, till it is either attacked by player, or it has detected player.
Death State: AI health has been depleted by player, AI will drop its weapon before its Game Object Set Active property is set to False by the AI Manager script.
Idle State: AI initial state once its Game Object Set Active property has been set to True by the AI Manager script
For optimization purposes the AI Manager script has been designed to only set an AI Game Object active when the player is at a specified distance to the AI already defined position.
A 3rd Person shooter with Ai's implemented using Finite State Machine technique. Designed 8 states for the FSM AI's, Attack, Cover Attack, Suspect, Go-To-Cover, Chase, Patrol, Death, Idle.
The AI's detect players using a sphere collider NonAlloc and uses some defined parameters to determine if the player is in it's range.
Unity Animation Rigging package was used for attaching weapon's to player and also to create weapon animations.
Attack State: AI has detected player and is already in a defined range which it can attack from.
Cover Attack state: AI is currently in cover and it has detected the player while behind cover, it will un-crouch at set intervals to attack the player from behind cover and if the distance between the AI and player is within the specified range it will leave the cover and switch to Attack state.
Suspect state : This state is entered when the player is moving behind the AI at an already defined distance and the sound from the movement passes an already defined threshold, the AI in this state will go the location which the sound threshold was passed.
Go-To-Cover State: AI hasn't detected player but it has taken damage, using the sphere collider it finds the nearest object with the tag "Cover" then calculates the dot product between the direction the damage came from and it's current position, uses the result to select which area of the "Cover" object it will run to and crouch
Chase state: AI has detected the player and the distance to player is greater than it's attacking range, in this state the AI will chase the player till it either gets to attacking range or it loses the player.
Patrol State: AI will move through already specified paths, till it is either attacked by player, or it has detected player.
Death State: AI health has been depleted by player, AI will drop its weapon before its Game Object Set Active property is set to False by the AI Manager script.
Idle State: AI initial state once its Game Object Set Active property has been set to True by the AI Manager script
For optimization purposes the AI Manager script has been designed to only set an AI Game Object active when the player is at a specified distance to the AI already defined position.





