This commit is contained in:
Johannes Theiner 2020-12-21 09:04:36 +01:00
parent 369deeeda5
commit d32a1d873a
Signed by: joethei
GPG Key ID: 9D2B9A00FDA85BCD
10 changed files with 6 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -77,8 +77,12 @@ float UOpenDoor::TotalMass() const
//Add Up Their Masses
for (AActor* Actor : OverlapingActors)
{
//UE_LOG(LogTemp, Display, TEXT("Actor: %s"), *Actor->GetName());
TotalMass += Actor->FindComponentByClass<UPrimitiveComponent>()->GetMass();
if(Actor->GetRootComponent()->Mobility == EComponentMobility::Movable)
{
//UE_LOG(LogTemp, Display, TEXT("Actor: %s"), *Actor->GetName());
TotalMass += Actor->FindComponentByClass<UPrimitiveComponent>()->GetMass();
}
}
return TotalMass;