A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
VRCharacter.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4#include "CoreMinimal.h"
5#include "VRBPDatatypes.h"
6#include "VRBaseCharacter.h"
11#include "VRRootComponent.h"
13#include "Runtime/Launch/Resources/Version.h"
14#include "VRCharacter.generated.h"
15
16
17DECLARE_LOG_CATEGORY_EXTERN(LogVRCharacter, Log, All);
18
19UCLASS()
20class VREXPANSIONPLUGIN_API AVRCharacter : public AVRBaseCharacter
21{
22 GENERATED_BODY()
23
24public:
25 AVRCharacter(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
26
27 // Overriding teleport so that it auto calls my controllers re-positioning
28 virtual bool TeleportTo(const FVector& DestLocation, const FRotator& DestRotation, bool bIsATest = false, bool bNoCheck = false) override;
29
30 UPROPERTY(Category = VRCharacter, VisibleAnywhere, Transient, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
31 UVRRootComponent * VRRootReference;
32
33 // Regenerates the base offsetcomponenttoworld that VR uses
34 virtual void RegenerateOffsetComponentToWorld(bool bUpdateBounds, bool bCalculatePureYaw) override;
35 virtual void SetCharacterSizeVR(float NewRadius, float NewHalfHeight, bool bUpdateOverlaps = true) override;
36 virtual void SetCharacterHalfHeightVR(float HalfHeight, bool bUpdateOverlaps = true) override;
37
38 /*
39 A helper function that offsets a given vector by the roots collision location
40 pass in a teleport location and it provides the correct spot for it to be at your feet
41 */
42 virtual FVector GetTeleportLocation(FVector OriginalLocation) override;
43
44
45 // Overriding to correct some nav stuff
46 FVector GetNavAgentLocation() const override;
47
48 // An extended simple move to location with additional parameters
49 virtual void ExtendedSimpleMoveToLocation(const FVector& GoalLocation, float AcceptanceRadius = -1, bool bStopOnOverlap = false,
50 bool bUsePathfinding = true, bool bProjectDestinationToNavigation = true, bool bCanStrafe = false,
51 TSubclassOf<UNavigationQueryFilter> FilterClass = NULL, bool bAllowPartialPath = true) override;
52
53};
DECLARE_LOG_CATEGORY_EXTERN(LogVRCharacter, Log, All)
virtual void SetCharacterSizeVR(float NewRadius, float NewHalfHeight, bool bUpdateOverlaps=true)
UFUNCTION(BlueprintCallable, Category = "BaseVRCharacter")
virtual FVector GetTeleportLocation(FVector OriginalLocation)
UFUNCTION(BlueprintPure, Category = "VRGrip")
virtual void ExtendedSimpleMoveToLocation(const FVector &GoalLocation, float AcceptanceRadius=-1, bool bStopOnOverlap=false, bool bUsePathfinding=true, bool bProjectDestinationToNavigation=true, bool bCanStrafe=false, TSubclassOf< UNavigationQueryFilter > FilterClass=NULL, bool bAllowPartialPath=true)
UFUNCTION(BlueprintCallable, Category = "VRBaseCharacter|Navigation", Meta = (AdvancedDisplay = "bSto...
virtual void RegenerateOffsetComponentToWorld(bool bUpdateBounds, bool bCalculatePureYaw)
UFUNCTION(BlueprintCallable, Category = "BaseVRCharacter|VRLocations")
virtual void SetCharacterHalfHeightVR(float HalfHeight, bool bUpdateOverlaps=true)
UFUNCTION(BlueprintCallable, Category = "BaseVRCharacter")
UCLASS()
Definition VRCharacter.h:23
UVRRootComponent * VRRootReference
UPROPERTY(Category = VRCharacter, VisibleAnywhere, Transient, BlueprintReadOnly, meta = (AllowPrivate...
Definition VRCharacter.h:38
UCLASS(Blueprintable, meta = (BlueprintSpawnableComponent), ClassGroup = VRExpansionLibrary)