diff --git a/Source/StevesUEHelpers/Public/StevesBPL.h b/Source/StevesUEHelpers/Public/StevesBPL.h index c33cf4a..afc548d 100644 --- a/Source/StevesUEHelpers/Public/StevesBPL.h +++ b/Source/StevesUEHelpers/Public/StevesBPL.h @@ -9,7 +9,7 @@ /** * Blueprint library exposing various things in a Blueprint-friendly way e.g. using by-value FVectors so they can - * be entered directly if required, rather than const& as in C++ + * be entered directly if required, rather than const& as in C++. Also use degrees not radians. */ UCLASS() class STEVESUEHELPERS_API UStevesBPL : public UBlueprintFunctionLibrary @@ -21,7 +21,7 @@ public: * Return whether a sphere overlaps a cone * @param ConeOrigin Origin of the cone * @param ConeDir Direction of the cone, must be normalised - * @param ConeHalfAngle Half-angle of the cone, in radians + * @param ConeHalfAngle Half-angle of the cone, in degrees * @param Distance Length of the cone * @param SphereCentre Centre of the sphere * @param SphereRadius Radius of the sphere @@ -30,7 +30,7 @@ public: UFUNCTION(BlueprintCallable, Category="StevesUEHelpers|Math") static bool SphereOverlapCone(FVector ConeOrigin, FVector ConeDir, float ConeHalfAngle, float Distance, FVector SphereCentre, float SphereRadius) { - return StevesMathHelpers::SphereOverlapCone(ConeOrigin, ConeDir, ConeHalfAngle, Distance, SphereCentre, SphereRadius); + return StevesMathHelpers::SphereOverlapCone(ConeOrigin, ConeDir, FMath::DegreesToRadians(ConeHalfAngle), Distance, SphereCentre, SphereRadius); } };