Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // .h
- #include "Runtime/Engine/Classes/GameFramework/Volume.h"
- UFUNCTION(BlueprintCallable, Category = Volume, CallInEditor, meta = (WorldContext = WorldContextObject))
- static void EncompassesPoint(AVolume* Volume, FVector Point, float SphereRadius, float& DistanceToPoint, bool& bEncompassesPoint);
- // .cpp
- void UDaakorunFunctionLibrary::EncompassesPoint(AVolume* Volume, FVector Point, float SphereRadius, float& DistanceToPoint, bool& bEncompassesPoint)
- {
- if (IsValid(Volume))
- {
- bEncompassesPoint = Volume->EncompassesPoint(Point, SphereRadius, &DistanceToPoint);
- }
- else
- {
- DistanceToPoint = 0.0f;
- bEncompassesPoint = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment