mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-03 19:15:55 +00:00
Simple knockback implementation
This commit is contained in:
parent
0146de8ab5
commit
78fe44e6ec
10 changed files with 96 additions and 8 deletions
|
|
@ -44,6 +44,8 @@ public partial class NavigationMovementModule : Node2D
|
|||
var nextPathPosition = _navigationAgent.GetNextPathPosition();
|
||||
|
||||
var newVelocity = currentAgentPosition.DirectionTo(nextPathPosition) * movementSpeed;
|
||||
|
||||
newVelocity += StorageModule.KnockbackVelocity;
|
||||
|
||||
if (_navigationAgent.AvoidanceEnabled)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue