pixelmeat

I have path1 (a looped path) and path2.
Animation 1 makes my object follow the path1 loop.
Animation 2 makes the object follow path2.
I am using a constraint "pathsCNS" that constraints my object position to whatever path is active inside slot "paths", so the only thing that animation 1 and 2 are doing is changing the active path on the first frame.
As you can see in the video, the object is performing some weird sped up movements when it should be moving in a mixed position between path1 and path2. Or at least that's what I think the mix should be doing. Am I doing something wrong animationwise or setupwise?
Many thanks in advance.



BTW, my intention here is to be able to have a smooth position transition between both paths and, if that works, update our current Unity runtimes to Spine4 and use these path transitions in our game.
사용자 아바타
pixelmeat
  • 전체글: 50

Erika

If you want to have a smooth transition of an object from one path to another, then having both paths in the same slot won't work because the switch of path attachment causes the sudden change.

You could instead have two separate constraints and turn the mix of the last constraint in the list to 0 in one animation, and 100 in the other, this should give you the result you are looking for.
사용자 아바타
Erika

Erikari
  • 전체글: 2951

pixelmeat

I'm gonna try this and report back, thanks!

---

Ok, tried what Erika suggested and the results are better, but I can still see that "rush" effect when mixing between paths. It's like the star was forced to complete the rest of the path and follow the next path from the beginning in the duration of the mix, regardless of the time it spends doing such mix. I find it hard to explain, sorry, but I hope you can see it in the video I'm attaching.



As always, thanks for the support!
사용자 아바타
pixelmeat
  • 전체글: 50

Erika

An alternative way of getting what you want that I guess you haven't conisdered is to play the two animations on two different tracks and change the Alpha of the highest track instead: Preview view - Spine User Guide: Alpha
사용자 아바타
Erika

Erikari
  • 전체글: 2951

pixelmeat

I didn't know that value even existed. I guess its whole purpose is to be used via runtimes, right? I'll have to give it a try.
Thanks again!
사용자 아바타
pixelmeat
  • 전체글: 50

stikkanimate

Don't forget that if you change the distance of a path (by adding more loops and curves) you change the position that the constrained object would cross over to the new path. Thereby speeding up or slowing down the speed of the constraint transfer in order to make it to the crossover point.

Try to make your paths as identical in overall length as possible even if you're not using much of any single path.
stikkanimate
  • 전체글: 65

pixelmeat

stikkanimate 작성:Try to make your paths as identical in overall length as possible
Oh, that could come in handy, I'll try it too. Thanks!
사용자 아바타
pixelmeat
  • 전체글: 50


다시 돌아감: Editor