Skip to content
Snippets Groups Projects
Commit 0dbe6c12 authored by Jonathan Wendt's avatar Jonathan Wendt
Browse files

allow to set the interaction ray invisible

parent e468f586
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ URwthComponent::URwthComponent()
void URwthComponent::Init()
{
bShowDebug = true;
SetVisibility(true);
InteractionDistance = 1000000.0f;
auto input_cmp = dynamic_cast<UInputComponent*>(GetOwner()->GetComponentByClass(UInputComponent::StaticClass()));
......@@ -23,6 +23,10 @@ void URwthComponent::Init()
RegisterComponent();
}
void URwthComponent::SetVisibility(bool visible) {
bShowDebug = visible;
}
void URwthComponent::OnFire(bool val)
{
if (val == true)
......
......@@ -89,6 +89,10 @@ void FWidgetInteractionModule::OnWorldTickStart(ELevelTick level_tick, float val
}
}
URwthComponent* FWidgetInteractionModule::GetWidgetInteractionComponent() {
return widget_interaction_cmp_;
}
void FWidgetInteractionModule::CreateWidgetInteraction(USceneComponent * parent, AVirtualRealityPawn* outer)
{
widget_interaction_cmp_ = NewObject<URwthComponent>(outer, URwthComponent::StaticClass());
......
......@@ -18,6 +18,8 @@ public:
void Init();
void SetVisibility(bool visible);
protected:
void OnFire(bool val);
......
......@@ -7,7 +7,7 @@
#include "RwthComponent.h"
#include "Modules/ModuleManager.h"
class FWidgetInteractionModule : public IModuleInterface
class WIDGETINTERACTION_API FWidgetInteractionModule : public IModuleInterface
{
public:
......@@ -18,6 +18,8 @@ public:
UFUNCTION()
void OnWorldTickStart(ELevelTick, float);
URwthComponent* GetWidgetInteractionComponent();
private:
void CreateWidgetInteraction(USceneComponent * parent, AVirtualRealityPawn* outer);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment