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

Add a ray mesh

parent 96b189e6
Branches
No related tags found
1 merge request!2Feature/update to new VRPawn structure and adding an interaction ray that is also available in shipping builds
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
File added
...@@ -5,12 +5,16 @@ ...@@ -5,12 +5,16 @@
#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 "ConstructorHelpers.h" #include "ConstructorHelpers.h"
#include "Modules/ModuleManager.h"
#include "Interfaces/IPluginManager.h"
#include "VirtualRealityPawn.h" #include "VirtualRealityPawn.h"
UVRWidgetInteractionComponent::UVRWidgetInteractionComponent() { UVRWidgetInteractionComponent::UVRWidgetInteractionComponent() {
InteractionRay = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Interaction Ray")); InteractionRay = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Interaction Ray"));
auto MeshAsset = ConstructorHelpers::FObjectFinder<UStaticMesh>(TEXT("StaticMesh'/Engine/BasicShapes/Cone.Cone'")); FString PluginContentDir = IPluginManager::Get().FindPlugin(TEXT("WidgetInteraction"))->GetContentDir();
FString ray_mesh_name = TEXT("StaticMesh'") + PluginContentDir + TEXT("/Ray_Mesh.Ray_Mesh'");
auto MeshAsset = ConstructorHelpers::FObjectFinder<UStaticMesh>(*ray_mesh_name);
if (MeshAsset.Object != nullptr) if (MeshAsset.Object != nullptr)
{ {
InteractionRay->SetStaticMesh(MeshAsset.Object); InteractionRay->SetStaticMesh(MeshAsset.Object);
......
...@@ -25,7 +25,7 @@ public class WidgetInteraction : ModuleRules ...@@ -25,7 +25,7 @@ public class WidgetInteraction : ModuleRules
PublicDependencyModuleNames.AddRange( PublicDependencyModuleNames.AddRange(
new string[] new string[]
{ {
"Core", "Core"
// ... add other public dependencies that you statically link with here ... // ... add other public dependencies that you statically link with here ...
} }
); );
...@@ -35,15 +35,16 @@ public class WidgetInteraction : ModuleRules ...@@ -35,15 +35,16 @@ public class WidgetInteraction : ModuleRules
new string[] new string[]
{ {
"CoreUObject", "CoreUObject",
"Engine",
"Projects",
"DisplayCluster", "DisplayCluster",
"DisplayClusterInput", "DisplayClusterInput",
"Engine",
"HeadMountedDisplay", "HeadMountedDisplay",
"DisplayClusterExtensions", "DisplayClusterExtensions",
"InputCore", "InputCore",
"UMG", "UMG",
"Slate", "Slate",
"SlateCore", "SlateCore"
// ... add private dependencies that you statically link with here ... // ... add private dependencies that you statically link with here ...
} }
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment