minor fixes
This commit is contained in:
@@ -368,16 +368,15 @@ bool USGVirtualHandComponent::GetMotionControllerData(FXRMotionControllerData& O
|
||||
{
|
||||
OutMotionControllerData.bValid = false;
|
||||
|
||||
if (GEngine)
|
||||
IXRTrackingSystem* XRTrackingSystem{GEngine ? GEngine->XRSystem.Get() : nullptr};
|
||||
if (!XRTrackingSystem)
|
||||
{
|
||||
IXRTrackingSystem* XrtTrackingSystem{GEngine->XRSystem.Get()};
|
||||
if (XrtTrackingSystem)
|
||||
{
|
||||
const EControllerHand Hand = IsRight() ? EControllerHand::Right : EControllerHand::Left;
|
||||
XrtTrackingSystem->GetMotionControllerData(this, Hand, OutMotionControllerData);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const EControllerHand Hand = IsRight() ? EControllerHand::Right : EControllerHand::Left;
|
||||
XRTrackingSystem->GetMotionControllerData(this, Hand, OutMotionControllerData);
|
||||
|
||||
return OutMotionControllerData.bValid;
|
||||
}
|
||||
|
||||
|
||||
@@ -184,16 +184,15 @@ bool USGWristTrackerComponent::GetMotionControllerData(FXRMotionControllerData&
|
||||
{
|
||||
OutMotionControllerData.bValid = false;
|
||||
|
||||
if (GEngine)
|
||||
IXRTrackingSystem* XRTrackingSystem{GEngine ? GEngine->XRSystem.Get() : nullptr};
|
||||
if (!XRTrackingSystem)
|
||||
{
|
||||
IXRTrackingSystem* XrtTrackingSystem{GEngine->XRSystem.Get()};
|
||||
if (XrtTrackingSystem)
|
||||
{
|
||||
const EControllerHand Hand = IsRight() ? EControllerHand::Right : EControllerHand::Left;
|
||||
XrtTrackingSystem->GetMotionControllerData(this, Hand, OutMotionControllerData);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const EControllerHand Hand = IsRight() ? EControllerHand::Right : EControllerHand::Left;
|
||||
XRTrackingSystem->GetMotionControllerData(this, Hand, OutMotionControllerData);
|
||||
|
||||
return OutMotionControllerData.bValid;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user