Skip to content
Snippets Groups Projects

Feature/update to new VRPawn structure and adding an interaction ray that is also available in shipping builds

Merged Jan Delember requested to merge feature/update_to_new_VRPawn into develop
3 files
+ 15
17
Compare changes
  • Side-by-side
  • Inline
Files
3
// Fill out your copyright notice in the Description page of Project Settings.
// Fill out your copyright notice in the Description page of Project Settings.
#include "RwthComponent.h"
#include "VRWidgetInteractionComponent.h"
 
#include "Runtime/InputCore/Classes/InputCoreTypes.h"
#include "Runtime/InputCore/Classes/InputCoreTypes.h"
#include "Runtime/Engine/Classes/Components/InputComponent.h"
#include "Runtime/Engine/Classes/Components/InputComponent.h"
#include "VirtualRealityPawn.h"
#include "VirtualRealityPawn.h"
URwthComponent::URwthComponent()
UVRWidgetInteractionComponent::UVRWidgetInteractionComponent() {}
{
}
void URwthComponent::Init()
void UVRWidgetInteractionComponent::Init()
{
{
SetVisibility(true);
SetVisibility(true);
InteractionDistance = 1000000.0f;
InteractionDistance = 1000000.0f;
auto input_cmp = dynamic_cast<UInputComponent*>(GetOwner()->GetComponentByClass(UInputComponent::StaticClass()));
auto input_cmp = dynamic_cast<UInputComponent*>(GetOwner()->GetComponentByClass(UInputComponent::StaticClass()));
@@ -23,11 +21,11 @@ void URwthComponent::Init()
@@ -23,11 +21,11 @@ void URwthComponent::Init()
RegisterComponent();
RegisterComponent();
}
}
void URwthComponent::SetVisibility(bool visible) {
void UVRWidgetInteractionComponent::SetVisibility(bool visible) {
bShowDebug = visible;
bShowDebug = visible;
}
}
void URwthComponent::OnFire(bool val)
void UVRWidgetInteractionComponent::OnFire(bool val)
{
{
if (val == true)
if (val == true)
PressPointerKey(EKeys::LeftMouseButton);
PressPointerKey(EKeys::LeftMouseButton);
Loading