Replies: 4 comments
-
I actually overrided |
Beta Was this translation helpful? Give feedback.
-
In fact, you did everything right, here is an example of code from my project that essentially does the same thing as yours: bool UDpAnimationInstance::IsSpineRotationAllowed()
{
return GetCurveValue(UDpAnimationConstants::FastDrawCurve()) > 0.0f || Super::IsSpineRotationAllowed();
} I also did this: bool UDpAnimationInstance::IsRotateInPlaceAllowed()
{
return GetCurveValue(UDpAnimationConstants::FastDrawCurve()) > 0.0f || Super::IsRotateInPlaceAllowed();
}
bool UDpAnimationInstance::IsTurnInPlaceAllowed()
{
return GetCurveValue(UDpAnimationConstants::FastDrawCurve()) <= 0.0f && Super::IsTurnInPlaceAllowed();
} If your game is mainly from the first person perspective, then you can simply use |
Beta Was this translation helpful? Give feedback.
-
This can also be helpful: bool ADpCharacter::TryRefreshCustomGroundedMovingActorRotation(const float DeltaTime)
{
if (GetMesh()->GetAnimInstance()->GetCurveValue(UDpAnimationConstants::FastDrawCurve()) <= 0.0f)
{
return false;
}
RefreshGroundedMovingAimingActorRotation(DeltaTime);
return true;
}
bool ADpCharacter::TryRefreshCustomGroundedNotMovingActorRotation(const float DeltaTime)
{
if (GetMesh()->GetAnimInstance()->GetCurveValue(UDpAnimationConstants::FastDrawCurve()) <= 0.0f)
{
return false;
}
RefreshGroundedNotMovingAimingActorRotation(DeltaTime);
return true;
}
bool ADpCharacter::TryRefreshCustomInAirActorRotation(const float DeltaTime)
{
if (GetMesh()->GetAnimInstance()->GetCurveValue(UDpAnimationConstants::FastDrawCurve()) <= 0.0f)
{
return false;
}
RefreshInAirAimingActorRotation(DeltaTime);
return true;
} |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! It's great to hear that I made it right! Also thank you for sharing additional code, this can be really helpful! I used curves because in some cases I don't want to rotate spine so it is good having ability to enabling/disabling them per animation. |
Beta Was this translation helpful? Give feedback.
-
Hey there,
If I'm not missing something, in order to have spine movement you have to be aiming in the game. That was not the case in BP version of ALS if I remember correctly.
For first person games this is not really good since I want my sword to be in the same location in the screen. I made some changes but I would love to stay loyal to ALS Refactored so I can upgrade it easily.
If it's by design would you consider adding an option to allow spine rotation manually with maybe extra curves? Like "OverrideSpineRotation" and this way you can push spine rotation even though you are not in aiming state. That would be amazing.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions