Pretty much what the title says ![]()
If I override ProcessFrame in the PlayableBehaviour it appears to get called for every frame EXCEPT the last one.
Pretty much what the title says ![]()
If I override ProcessFrame in the PlayableBehaviour it appears to get called for every frame EXCEPT the last one.
Timeline clips are inclusive on the first frame and exclusive on the last frame. By that I mean a clip that starts at 2 seconds and has a duration of 2 seconds will be active up to, but not including, 4 seconds.
The reasoning behind this is predictability of adjacent clips. If a second clips starts at 4 then we don’t want both active when the playhead is exactly at 4.
How do we handle the last frame of the animation then?
We have a custom camera component that gets added to the same GameObject as the Unity camera. This custom camera component connects to our back end pipeline and pulls per frame animation data. The component has a currentFrame field which when set pulls that frame’s data from the pipeline and updates the GO’s transform, the Unity Camera’s FOV, as well as other data.
This all works ok on its own, and now I am trying to hook it up to Timeline. As the clip plays or is scrubbed, I update the currentFrame field on the custom camera. This seems to work well, though I was having problems figuring out the proper frame initially, but your replies to the other post should help with that so thanks!
Problem is that since ProcessFrame doesn’t get called for the last frame, the camera never gets its last frame of animation updated.
Is this mentioned anywhere in the documentation, and if so can you please link to where?
If not, please make sure the relevant colleague is notified of the needed amendment ASAP, thank-you! ![]()
ignored… lol
I’m having the same issue here, besides I move my player character between two GameObjects. Having no access to the last frame results in an ugly jump, visually this doesn’t work at all. Sorry, but there must be a solution to get an animation evaluated as a whole!