Türen Toleranz wieder hinzugefügt
This commit is contained in:
parent
d41c66939e
commit
1c47cd6778
|
@ -21,7 +21,7 @@ void URotatingActor::TickComponent(float DeltaTime, ELevelTick TickType, FActorC
|
||||||
if (rotating)
|
if (rotating)
|
||||||
{
|
{
|
||||||
FRotator Rotation = GetOwner()->GetActorRotation();
|
FRotator Rotation = GetOwner()->GetActorRotation();
|
||||||
if (Rotation.Equals(targetRotation, 1.0f))
|
if (Rotation.Equals(targetRotation, Tolerance))
|
||||||
{
|
{
|
||||||
rotating = false;
|
rotating = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,9 @@ public:
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
bool Negative = false;
|
bool Negative = false;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
float Tolerance = 1.f;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FRotator targetRotation;
|
FRotator targetRotation;
|
||||||
|
|
Loading…
Reference in New Issue