Thanks! Yes it is as you describe it. To be honest, it would be more intuitive if the pose would match the prev pose. But i can work with that.
5yF0Rc3

- 29 sept. 2023
- Inscrit 7 avr. 2023
Nate
Hi, yes sorry:
im setting it in the modified "SpineboyBeginnerView"
173: skeletonAnimation.AnimationState.GetCurrent(0).Reverse = bool
and this is called while pressing the spacebar.
The Scene is the nr. 4 of the expamles.
Here a reuploadIm using the 4.1 Version.
I want to reverse my animation. This does work. Hower, the animation will not reverse it smoothly, it "jumps" to a diffrent start... In this Gif you can see it, at every "jump" i just reversed the animation.
Is this how it should work?
Here is an Example Project (I modified the Nr.4 example). "Space" will change the direction.
DriveHarald Thanks.
I have found the problem: I am reversing the Animation for backwards walking like:
Spine.TrackEntry track = _skeletonAnimation.AnimationState.SetAnimation(0, _animWalk, true);
track.Reverse = true;
but somehow this ended up messing with all the other Animations and setting them (sometimes) also in reverse. I dont know why though. I thought the TrackEntry is only one animation, and I checked withtrack.Animation
which returned always the correct one.Harald
Thank You! I did set my MixDuration manualy in Code and the slow motion is gone!
like this:
// Mix tables - in Start because AnimationState may does not exist in Awake
Spine.AnimationStateData _stateData = _skeletonAnimation.state.Data;
_stateData.DefaultMix = 0.01f;
_stateData.SetMix(_animLanding.name, _animIdle.name, 0.06f);
_stateData.SetMix(_animLanding.name, _animWalk.name, 0.2f);
.........
_skeletonAnimation.AnimationState.Data = _stateData;The problem with the skipping was my fault, Important here is following statement of the
.SetAnimation()
If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).
Finally, the animation not helding its pose after a non-looping
.setAnimation()
did not resolve itself. Debugging it withGetCurrentTrackEntry(0).Animation.Name
shows that the animation is played correctly till the landing replaces it. But the animation will still occasionally reset itself to the setup pose. I try solving this with an looping "in air" animation which will never depend on the last pose of setAnimation.I have multiple problems adding animations and changing the speed: For the finetuning of our animation duration we are using the TimeScale of the TrackEntry like this:
public void Jump()
{
_skeletonAnimation.AnimationState.SetAnimation(0, _animJump, false).TimeScale = _animJumpSpeed;
_currentState = AnimationState.InAir;
}
The speed part working as expected. Howerever it's not working on all animations... The "landing" animation is not changeable with the TrackEntry, but setting the AnimationState.TimeScale would work (but then i can't controll the animations i add with .AddAnimation() ) .
The code for the landing:
public void Grounded()
{
if ((_currentState != AnimationState.InAir & WasGrounded)) { return; }
print("Landing");
_skeletonAnimation.AnimationState.AddAnimation(0, _animLanding, false, 0f).TimeScale = _animLandingSpeed;
_skeletonAnimation.AnimationState.AddAnimation(0, _animIdle, true, 0f).TimeScale = _animIdleSpeed;
_currentState = AnimationState.Idle;
return;
}
- sequence: I think the animation is skipped an going straight to "walk"
- seq: the jump is not held
- seq: the speed problem:
The Animation is even slower than the orginal speed . And the second problem is, its seems like the jump animation is not always holding its last position even tough there should be no other animation interfere till the landing:
Any suggestions?