Last active
November 2, 2022 07:41
-
-
Save RootKiller/6a5bc07a0c8dab7aaa037a308e92ce46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const float MaxObjectMassToGrabKg = 50.0f; | |
// Before | |
bool AJanuszCharacter::IsAbleToGrabComponent(UPrimitiveComponent* Component) const | |
{ | |
if (Component->CalculateMass() > MaxObjectMassToGrabKg) | |
{ | |
return false; | |
} | |
return true; | |
} | |
// After | |
bool AJanuszCharacter::IsAbleToGrabComponent(UPrimitiveComponent* Component) const | |
{ | |
return (Component->CalculateMass() <= MaxObjectMassToGrabKg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment