Hey guys!
I’m relatively new to this engine, so please pardon me if I ask something trivial, but I didn’t find the answer yet.
I have a character ragdoll that I would like to stand up after some conditions are met. For this I have a set of animations for different poses of the ragdoll, e.g. standing up after lying on back, front, etc. After I determine the direction the skeletal mesh is facing I set some variables that affect my animation state machine in my anim blueprint to transition to a state that corresponds to the given get up animation. At the same time I gradually blend out the physics simulation so that the skeleton smoothly transitions from it’s current lying position to the corresponding animation.
The problem I have is that I would like to first smoothly disable physics using physics blend to blend out to the first frame of a paused animation and then after some time unpause the animation. Currently both things happen simultaneously and the problem is that sometimes physics starts blending out when the character’s animation is still in its idle state. This sometimes produces weird effects I would like to avoid.
So my idea to solve this would be to first set the state to a proper stand up animation, pause the animation at the first frame and after I have finished blending out physics, I would like to unpause the animation again. The problem is that I don’t really know how to do this.
I have tried to set first set my variables that affect the animation state machine and then do
GetMesh()->GlobalAnimRateScale = 0.0f;
Unfortunately this would stop the whole thing at the idle state and never transition from it until I set the rate back to 1.0, so when blending out physics it would get back to the paused idle pose, and once the rate is back at 1.0 it would play the animation.
I’m doing everything in C++ besides the animation blueprint.
Any ideas?