flying knockback as well
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Has been cancelled

This commit is contained in:
2026-01-18 16:58:23 +01:00
parent 35b9ea383c
commit eb1c7f78fa
8 changed files with 33 additions and 12 deletions

View File

@@ -27,7 +27,7 @@ public partial class CFlyingMovement : Node3D, IMoveable
// Check if we have a direct line of sight to the player
if (!_movingToDesiredHeight)
{
velocity = direction * RMovement.Speed;
velocity = velocity.Lerp(direction * RMovement.Speed, (float) inputs.delta * RMovement.Acceleration);
var query = PhysicsRayQueryParameters3D.Create(GlobalPosition, target, TerrainCollision);
var result = spaceState.IntersectRay(query);
@@ -39,7 +39,7 @@ public partial class CFlyingMovement : Node3D, IMoveable
}
else
{
velocity = _randomDirection * RMovement.Speed;
velocity = velocity.Lerp(_randomDirection * RMovement.Speed, (float) inputs.delta * RMovement.Acceleration);
var groundQuery = PhysicsRayQueryParameters3D.Create(GlobalPosition, GlobalPosition+Vector3.Down*RMovement.TargetHeight, TerrainCollision);
var groundResult = spaceState.IntersectRay(groundQuery);