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