working in-editor hand animation
This commit is contained in:
@@ -71,6 +71,11 @@ void FSGVirtualHandAnimInstanceProxy::PreEvaluateAnimation(UAnimInstance* InAnim
|
||||
return;
|
||||
}
|
||||
|
||||
if (!VirtualHand->IsGloveConnected())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BonesRotations.Empty();
|
||||
BonesRotations = VirtualHand->GetFingersBonesRotations();
|
||||
}
|
||||
|
||||
@@ -173,6 +173,7 @@ USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& Objec
|
||||
bTickInEditor = true;
|
||||
bNeverNeedsRenderUpdate = false;
|
||||
bAllowConcurrentTick = true;
|
||||
SetUpdateAnimationInEditor(true);
|
||||
|
||||
SetCastShadow(true);
|
||||
SetCastHiddenShadow(false);
|
||||
@@ -335,6 +336,11 @@ TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
|
||||
{
|
||||
TMap<FName, FRotator> Rotations;
|
||||
|
||||
if(!IsGloveConnected())
|
||||
{
|
||||
return MoveTemp(Rotations);
|
||||
}
|
||||
|
||||
const USGHandPose* HandPose = GetHandPose();
|
||||
if (!IsValid(HandPose))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user