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

Add a ray mesh

parent 96b189e6
No related branches found
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 @@
#include "Runtime/InputCore/Classes/InputCoreTypes.h"
#include "Runtime/Engine/Classes/Components/InputComponent.h"
#include "ConstructorHelpers.h"
#include "Modules/ModuleManager.h"
#include "Interfaces/IPluginManager.h"
#include "VirtualRealityPawn.h"
UVRWidgetInteractionComponent::UVRWidgetInteractionComponent() {
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)
{
InteractionRay->SetStaticMesh(MeshAsset.Object);
......
......@@ -25,7 +25,7 @@ public class WidgetInteraction : ModuleRules
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"Core"
// ... add other public dependencies that you statically link with here ...
}
);
......@@ -35,15 +35,16 @@ public class WidgetInteraction : ModuleRules
new string[]
{
"CoreUObject",
"Engine",
"Projects",
"DisplayCluster",
"DisplayClusterInput",
"Engine",
"HeadMountedDisplay",
"DisplayClusterExtensions",
"InputCore",
"UMG",
"Slate",
"SlateCore",
"SlateCore"
// ... 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