-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHelperLibrary.h
More file actions
27 lines (19 loc) · 847 Bytes
/
HelperLibrary.h
File metadata and controls
27 lines (19 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 2017 WindyDarian (RuoyuF). MIT License
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "HelperLibrary.generated.h"
/**
*
*/
UCLASS()
class WILDHUNT_API UHelperLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "HelperLibrary")
static FVector CalculateProjectileDirection(FVector Target, FVector Origin, FVector Gravity, float Speed, bool& bWillHit, float& Time);
/**
* Calculate a projectile direction to hit a target with constant velocity
*/
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "HelperLibrary")
static FVector CalculateProjectileDirectionForMovingTarget(FVector Target, FVector TargetVelocity, FVector Origin, FVector Gravity, float Speed, bool& bWillHit, float& Time, int Iterations = 5, float EpsilonTime = 0.01f);
};