Skip to content
Snippets Groups Projects
Commit 3da9a6a2 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

Merge branch 'fix/WalkMovementRotationDependency' into 'dev/5.4'

Walk Movement Controller Rotation Dependency Fix

See merge request !103
parents 77e27346 9ea93a8b
No related branches found
No related tags found
1 merge request!103Walk Movement Controller Rotation Dependency Fix
Pipeline #489553 canceled
...@@ -41,8 +41,11 @@ void UCollisionHandlingMovement::TickComponent(float DeltaTime, enum ELevelTick ...@@ -41,8 +41,11 @@ void UCollisionHandlingMovement::TickComponent(float DeltaTime, enum ELevelTick
{ {
// you are only allowed to move horizontally in NAV_WALK // you are only allowed to move horizontally in NAV_WALK
// everything else will be handled by stepping-up/gravity // everything else will be handled by stepping-up/gravity
// so remove Z component for the input vector of the UFloatingPawnMovement // so rotate the input vector onto horizontal plane
InputVector.Z = 0.0f; const FRotator InputRot = FRotator(InputVector.Rotation());
const FRotator InputYaw = FRotator(0, InputRot.Yaw, 0);
InputVector = InputRot.UnrotateVector(InputVector);
InputVector = InputYaw.RotateVector(InputVector);
ConsumeInputVector(); ConsumeInputVector();
AddInputVector(InputVector); AddInputVector(InputVector);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment