diff --git a/Content/Ray_Material.uasset b/Content/Ray_Material.uasset new file mode 100644 index 0000000000000000000000000000000000000000..9a2ca1570d5f6f11102c828b041f74a4c1d00b51 Binary files /dev/null and b/Content/Ray_Material.uasset differ diff --git a/Content/Ray_Mesh.uasset b/Content/Ray_Mesh.uasset index 50b3087142ab0a6b2da9444d0d663e21151dfeed..594e564fcd76aac35ef8ccac010a813ef6c9ba28 100644 Binary files a/Content/Ray_Mesh.uasset and b/Content/Ray_Mesh.uasset differ diff --git a/Source/WidgetInteraction/Private/VRWidgetInteractionComponent.cpp b/Source/WidgetInteraction/Private/VRWidgetInteractionComponent.cpp index b3c50870a11402bbe87384908041e6691de5b97d..582e8597e8f52474f6e8856fb149dee5d190a459 100644 --- a/Source/WidgetInteraction/Private/VRWidgetInteractionComponent.cpp +++ b/Source/WidgetInteraction/Private/VRWidgetInteractionComponent.cpp @@ -12,12 +12,11 @@ UVRWidgetInteractionComponent::UVRWidgetInteractionComponent() { InteractionRay = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Interaction Ray")); - 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); + auto MeshAsset = ConstructorHelpers::FObjectFinder<UStaticMesh>(TEXT("/WidgetInteraction/Ray_Mesh")); if (MeshAsset.Object != nullptr) { InteractionRay->SetStaticMesh(MeshAsset.Object); + //InteractionRay->SetRelativeRotation(FRotator(0, 90, 0)); } } @@ -44,4 +43,4 @@ void UVRWidgetInteractionComponent::OnFire(bool val) PressPointerKey(EKeys::LeftMouseButton); else ReleasePointerKey(EKeys::LeftMouseButton); -} \ No newline at end of file +}