Türen Toleranz wieder hinzugefügt

This commit is contained in:
Johannes Theiner 2021-03-13 19:57:51 +01:00
parent d41c66939e
commit 1c47cd6778
Signed by: joethei
GPG Key ID: 9D2B9A00FDA85BCD
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@ void URotatingActor::TickComponent(float DeltaTime, ELevelTick TickType, FActorC
if (rotating)
{
FRotator Rotation = GetOwner()->GetActorRotation();
if (Rotation.Equals(targetRotation, 1.0f))
if (Rotation.Equals(targetRotation, Tolerance))
{
rotating = false;
}

View File

@ -38,6 +38,9 @@ public:
UPROPERTY(EditAnywhere)
bool Negative = false;
UPROPERTY(EditAnywhere)
float Tolerance = 1.f;
private:
FRotator targetRotation;