Hello, I am bringing this discussion from the Cinemachine thread to this thread because Cinemachine was not the issue. Props to "Gregoryl" for still being kind enough to try to help me there. However the issue persists.
From what I am to understand right now, I am using the timeline to set up a simple cutscene and I am using root motion to drive the character animations for the cutscene. The one problem I encountered was that when applying root motion to the character when I hit play mode it always wanted to jump to 0,0 because that is where itās root is centered.
So I applied a root offset to the character so it would animate in the proper location.
Now the issue is that the timeline showed perfect playback of what I wanted but when I hit play it appears as if the root offset is not correct because the character does notā¦ well animate properly at all things like spawning in wrong locations and walking straight upwards.
I did have a chat with someone on youtube who said this could be caused by a current bug in the timeline and I would just have to wait for a fix.
My question is other than waiting or redoing how my animation is played(root motion), is there a fix for this?
Just letting you know that the next response will likely be something like: āwe need to be able to reproduce the bug ourselvesā (which is true)
If you can show a screen shot if your exact setup (or multiple showing animation, timeline, the object,ā¦) and explain step by step how someone else can have the problem as well, then the bug will most likely get fixed pretty fast.
Someone from Unity Technologies already replied in the first thread and they are working on a fix for the next release. My main goal here was hoping to find a workaround so that I can get an executable demo going.
1.) Apply root motion to an animated character
2.) Set up the animation to play in the timeline
3.) Apply an offset to the root in the timeline
4.) View the offset working in the game view by pressing play in the timeline
5.) Play the scene with the play button and view different results
The easiest way i found for static sequences, is to give each actor a parent with the same transform as the object. this way, we you select the timeline, it wonāt reset the actor to the origin of the scene, but the origin of the parent instead(which if the transform is the same, it wonāt budge). Then if you want to move or reposition the actor, drag its parent around and not the actually object.
This seems to be the only thread i found that is talking about a similar problem i have in my 2d game and this
works but is this intended ?
The animator and controller i use in the timeline is also used when i move my character so i thought it would only be natural to use the same walk animclips to create my shots, but is this wrong? should i double up and have 1 animclip for the Timeline and 1 for movement ?
What is the ideal setup so we dont run into this issue where the preview and playmode dont sync unless you remove the animator controller.
Weāve addressed this with 2018.3. The animation track now has options for āOffsetsā. āTrack Offsetā let you start from a fixed position (relative the parent), and Scene Offsets take the position when the timeline started playing. They both work independent of having an animation controller.
Hello @seant_unity , thx for the respons on this old post, but my problem is different. Its not a positional problem but rather the results of a anim clips post-extrapolation result the sprite animation dosent hold the last frame.
My character pulls out a phone and looks at it (so the last frame is character looking at phone) so HOLD the last frame. In preview mode this works fine, but in play mode the character snaps back to original(idle) sprite.
When i now remove the controller from the animator everything works fine (preview/play).
Oh right, that is completely different! Iām not even sure what would cause that, is there any chance you could log a bug so we could get the repro case?
No problem @seant_unity , but il need some time(work) and i have never logged a bug before so not sure how to do it (but il figure it out). But i can now safely assume that this is a bug and do not feel bad on a hacky work around.
Hey, the issue you described above is really like mineā¦ Here my post: https://discussions.unity.com/t/774350
Iām hoping someone will know how to fix it or maybe itās a bug of post-extrapolate :<
Somehow, I think the prob comes from the Animator itself :< Iām using Blend Tree to control the Animation when character moving around.
I set up 2 parameters āMoveXā and āMoveYā for 2D Simple Directional and use GetAxisRaw method.
I believe when the Timeline processed, it didnāt SetFloat to the parameters. As a consequence, when the Animator took the control back, it would use the Animation representing 2 parameters in the Blend Tree.