- fixed jumping ledge to ledge jump to the right animation
- fixed camera rotations when entering / exiting additive mode
- made attackSweepBody optional - if missing, obstruction checks will be skipped
- npcs that dont have TriggerManagement component will deactivate offMeshLinks and calculate path without them ( if path exists)
- npcs now require to have NpcAttacks component.
It provides information on first attack. It is used this way mainly because of melee attack range.
Different attacks can use different ranges so system must know in front what range to use so that it can calculate pathfinding distances.
Second, npc can use attacks based on that attack range, so if player is a little further, npc can jump attack to it ( if it has jump-attack ).
- added possibility to add AnimationEventInformation scriptable object to animations ( OnAnimationEvent, AttackHitEvent )
Add clips, particles and per attack additional information to animations events
- added option to disable hit reactions while npc is attacking ( to make stronger npcs and bosses )
To make attack non breakable: check 'unbreakable' field in NpcAttacks component for that attack.
- added behaviour system to npcs + companion behaviour:
Use behaviour classes for managing npc behaviours.
There are default behaviours: guard, patrol for humans and mech for mechs ( models with turrets that may shoot ).
Also there are follower and mech follower behaviours which are used when picking up companions.
to set new behaviour use 'setNewBehaviour(...)' method on npc.
There is default method of drawing ( less that ideal ) companion and move command UI.
To replace companion UIs you can use 'controlCompanion(...)' method on player scripts ( third person player uses different method then top down player )
- to create new npc behaviour click on 'Assets/Create New NPC Behaviour' or click on Assets folder right button ( like creating new asset ) and also choose 'Create New NPC Behaviour )
- override onNonCombat(), onCombat() and/or other behaviour methods as suits your needs.
- of course, you can check existing behaviour classes for more insight
Control companions:--------------------------------------------------------------------------------
- choose companion from your team with 'Use' button ( if NPC is not companion )
- choose target for companions from other teams with 'Use' button ( if NPC is memeber of other teams )
- make companion leave the squad ( if NPC is memeber of your company )
- press 'LockOn' + 'Use' button and point on ground to make companion move to that position
------------------------------------------------------------------------------------------------------
- added new import animation event = 'TakeHitEvent'. You can put it on any take hit animation and it will prevent starting hit reactions during that animation.
For instance, if your character is falling down, you want to prevent another take hit animation which will make him be in standing pose.
- added new import animation event = 'EnableRagdollCollision'. You can put it on death animations probably on end of it.
It will enable body colliders in kinematic mode ( will not start ragdoll ) and player will be able to collide with dead character.
-added possibility to NavMeshObstacle component on NPC so it can be used on death.
- added new import animation event = 'EnableNavMeshObstacle'.You can put it on death animation end also.
It will enable NavMeshObstacle component on npc ( if exists ) so other npcs can avoid it when lying dead.
- added new import animation event = 'EnableNavMeshObstacleAndBodyColliders'
It enables body colliders and NavMeshObstacle like in previous 2 events.
- added new import animation event = 'EnableClipControlEvent'
It enables character movement be controlled by animation clip. For instance, when attacking-jumping enable clip control so that physics dont drag character to ground.
- added new import animation event = 'DisableClipControlEvent'
It disables animation clip control and return to normal physics controlled character
Keep in mind that NPCs endAttackCombo() method ( on end of every attack ) automatically calls to disable animation clip control.
Also, prefer to enable animation control than baking animation in import settings because of more accurate calculations.
For instance, if NPC is jump-attacking and gets killed in air, by accurate calculation, it will start death by ragdoll, otherwise
animation death animation would start in air.
- added option to enable/disable hit reactions on NPC ( usefull for big bosses to disable hit reactions ) - 'NPCScript.allowHitReaction' field
- added option to enable/disable attacks when on ground ( ragdoll or animation ) - 'NPCScript.allwHitsOnGround' field
- added option to assign minimum distance to target
- disabled equipping of weapons when in ragdoll ( for now its disabled - in the future I'll make it equip just after ragdoll ends )