From f46597bc8fa3fb4c1537b76a6305fe0f04bd7e3e Mon Sep 17 00:00:00 2001 From: pnossol <patrick.nossol@gmail.com> Date: Sat, 9 Jul 2022 13:09:40 +0200 Subject: [PATCH] Added property to MCPawn --- Content/Measurements.txt | 2 +- Source/MoCapPlugin/Private/MCPawn.cpp | 3 +-- Source/MoCapPlugin/Public/MCPawn.h | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Content/Measurements.txt b/Content/Measurements.txt index eacd9d2..856df62 100644 --- a/Content/Measurements.txt +++ b/Content/Measurements.txt @@ -12,7 +12,7 @@ LowerArm = 26.0 //D - Distance from floor to hip HipHeight = 102.0 -//E - Height from Hipbones to top of shoulders +//E - Height from hipbones to top of shoulders NeckToHip = 50.5 //F - Height from top of shoulders to slidely under the mouth diff --git a/Source/MoCapPlugin/Private/MCPawn.cpp b/Source/MoCapPlugin/Private/MCPawn.cpp index 8c2dcae..60031f0 100644 --- a/Source/MoCapPlugin/Private/MCPawn.cpp +++ b/Source/MoCapPlugin/Private/MCPawn.cpp @@ -82,8 +82,7 @@ AMCPawn::AMCPawn(const FObjectInitializer& ObjectInitializer) void AMCPawn::BeginPlay() { Super::BeginPlay(); - bool show = true; - if (show) { + if (ShowDeviceModels) { SensorSetup.HandL.ControllerComponent->SetShowDeviceModel(true); SensorSetup.HandR.ControllerComponent->SetShowDeviceModel(true); for (FSensor& Tracker : SensorSetup.Trackers) { diff --git a/Source/MoCapPlugin/Public/MCPawn.h b/Source/MoCapPlugin/Public/MCPawn.h index 2a83c6f..e0d1483 100644 --- a/Source/MoCapPlugin/Public/MCPawn.h +++ b/Source/MoCapPlugin/Public/MCPawn.h @@ -28,6 +28,8 @@ public: bool UseKneeAsFoot; + bool ShowDeviceModels = true; + UPROPERTY(BlueprintReadOnly) FSensorSetup SensorSetup; -- GitLab