Skip to content
Snippets Groups Projects
Commit 5fff5b7e authored by Kris Tabea Helwig's avatar Kris Tabea Helwig
Browse files

style(pawn): fixes clang format in RWTHVRPawn.cpp and RWTHVRPawn.h

parent e3e150ba
No related branches found
No related tags found
3 merge requests!118fix: Converted all static meshes to nanite,!115Feature/scaling,!114Feature/scaling
Pipeline #553427 failed
......@@ -43,14 +43,15 @@ ARWTHVRPawn::ARWTHVRPawn(const FObjectInitializer& ObjectInitializer) : Super(Ob
LeftHand->SetupAttachment(RootComponent);
UniformScale = GetActorScale3D().X;
GetRootComponent()->TransformUpdated.AddLambda([this](USceneComponent*, EUpdateTransformFlags, ETeleportType)
GetRootComponent()->TransformUpdated.AddLambda(
[this](USceneComponent*, EUpdateTransformFlags, ETeleportType)
{
FVector CurrentScale = this->GetActorScale3D();
if (CurrentScale.X != UniformScale || CurrentScale.Y != UniformScale || CurrentScale.Z != UniformScale)
{
UE_LOGFMT(Toolkit, Warning,
"ARWTHVRPawn: Do not adjust the scale of the pawn directly. This will not work in VR. Use ARWTHVRPawn::SetScale(float) instead.")
;
"ARWTHVRPawn: Do not adjust the scale of the pawn directly. This will not work in VR. Use "
"ARWTHVRPawn::SetScale(float) instead.");
}
});
}
......@@ -87,10 +88,7 @@ void ARWTHVRPawn::SetScale(float NewScale)
OnScaleChanged.Broadcast(OldScale, NewScale);
}
float ARWTHVRPawn::GetScale()
{
return UniformScale;
}
float ARWTHVRPawn::GetScale() { return UniformScale; }
/*
* The alternative would be to do this only on the server on possess and check for player state/type,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment