- Game engine: Unreal (v5.0)
- Contribution: Louis BANDELIER
- Keywords: lock system, animation tree, behavior tree
A 4-day project where I implemented a basic lock system on Unreal Engine 5.0. NPCs use a behavior tree to freely roam and react to the player's actions. The player can lock an NPC and interact with him.
- Setup blank project
- Recreated the third person template with an interest on the following features:
- Character class, controller, 3D model, materials, animations, animation tree
- Game mode default classes
- Add an NPC character with AI controller supported by a behavior tree, a blackboard and tasks
- Add a navmesh to the map and a simple roam behavior for the AI controlled NPCs
- Add a pawn sensing component to the NPC character
- Add the dectection of actors around player
- Add an NPC lock system:
- Detection:
- Select valid NPCs around the player (valid angle & distance)
- Give the selected NPCs a score based on angle & distance
- Select the NPC with the highest score
- (Day 3) Update the GUI to signal a NPC is lockable
- Lock:
- If not already locked and if there is a lockable NPC
- Lock the NPC
- (Day 3) Update the GUI to signal a NPC is locked and display available interactions
- Detection:
- Add custom actor rotation system
- Update NPC lock system:
- Look for new candidates only if not already locked
- Give locked character more distance before being unlocked
- Increase maximal angle for valid lock
- Update score function
- Make player face its locked target
- Update AI roam controller:
- Transition from Blueprint to C++ class
- Improve character rotation system
- Add a NPC interaction system:
- Greet: the AI stops roaming, faces the player, waits a moment, goes back to normal
- Aim weapon: the AI stops what he does, run around until the player stops aiming at him
- Add dialog system (+small lines for interaction)
- Add an animation for aim weapon