Implement Line Trace through Crosshairs
This commit is contained in:
@@ -46,7 +46,16 @@ public:
|
||||
int64 GetPlayerId();
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex")
|
||||
void SetLookAtDetector(UlxLookAtActorBase *det);
|
||||
void SetLookAt(AActor *actor) { CurrentLookAt = actor; }
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex")
|
||||
AActor *GetLookAt() const { return CurrentLookAt; }
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex")
|
||||
bool LookAtChanged() const { return CurrentLookAt != PreviousLookAt; }
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = "Luprex")
|
||||
void CalculateLookAt(AActor *Player, APlayerController *PlayerController, APlayerCameraManager *Camera);
|
||||
|
||||
// Assemble a lua call. To call into lua:
|
||||
//
|
||||
@@ -81,6 +90,10 @@ public:
|
||||
// Maybe call 'BecomePossessed' on the player tangible.
|
||||
void UpdatePossessedTangible();
|
||||
|
||||
// Call 'CalculateLookAt', but only if everything is valid.
|
||||
// It is up to the blueprint code to actually determine what we're looking at.
|
||||
void UpdateLookAt();
|
||||
|
||||
// Pre-tick and post-tick functions.
|
||||
void OnWorldPreActorTick(UWorld* InWorld, ELevelTick InLevelTick, float InDeltaSeconds);
|
||||
void OnWorldPostActorTick(UWorld* InWorld, ELevelTick InLevelTick, float InDeltaSeconds);
|
||||
@@ -97,8 +110,13 @@ public:
|
||||
UPROPERTY()
|
||||
UlxTangibleManager *TangibleManager;
|
||||
|
||||
// The actor that the player is looking at, previous frame.
|
||||
UPROPERTY()
|
||||
UlxLookAtActorBase *LookAtDetector;
|
||||
AActor *PreviousLookAt;
|
||||
|
||||
// The actor that the player is looking at, current frame.
|
||||
UPROPERTY()
|
||||
AActor *CurrentLookAt;
|
||||
|
||||
// This stores the entire text currently visible in the console.
|
||||
FlxConsoleOutput ConsoleOutput;
|
||||
|
||||
Reference in New Issue
Block a user