Lots of refactoring related to Movement Component State. Still not done yet.

This commit is contained in:
2026-02-13 23:24:18 -05:00
parent 30e53c3054
commit 107cb57b66
17 changed files with 621 additions and 331 deletions

View File

@@ -239,3 +239,15 @@ FKey UlxUtilityLibrary::GetKeyByNameString(const FString &Name)
FKey Key = FKey(FName(*Name));
return Key.IsValid() ? Key : FKey();
}
FVector UlxUtilityLibrary::GetActorForwardVelocity(const AActor *Actor, double Speed, bool bSnapToXY)
{
if (!Actor) return FVector::ZeroVector;
FVector Forward = Actor->GetActorForwardVector();
if (bSnapToXY)
{
Forward.Z = 0.0;
if (!Forward.Normalize()) return FVector::ZeroVector;
}
return Forward * Speed;
}