-
Notifications
You must be signed in to change notification settings - Fork 1
Stack/03 animation playables#370
Merged
Merged
Conversation
@JucanAndreiDaniel
JucanAndreiDaniel
added
the
improvement
Optimize an existing feature
label
Jun 13, 2026
@JucanAndreiDaniel
JucanAndreiDaniel
force-pushed
the
stack/02-vob-loading
branch
from
June 14, 2026 08:50
5b8e619 to
c1eb815
Compare
Replaces the O(n) Queue.Contains() guard with a per-loader IsQueued flag, batch-drains the queue (10/frame) skipping destroyed entries, and clears pending entries on world change.
...onSkeleton Pose sampling/blending now runs as a Burst AnimationPoseJob over native arrays described by AnimationSkeleton, replacing the managed per-keyframe model.
...native samples AnimationTrack holds shared NativeArray pose buffers (with alias buffer sharing and InvertYAxis); AnimationTrackInstance is reduced to a lightweight playback cursor over them.
Bakes each track's positions/rotations once, pins root X/Z, stores root-Y as a rest-height offset, computes root-motion speed and flags sitting poses for Y inversion.
Schedules AnimationPoseJob through an AnimationScriptPlayable graph and applies baked root motion via RootCollisionHandler.
@JucanAndreiDaniel
JucanAndreiDaniel
force-pushed
the
stack/03-animation-playables
branch
from
June 14, 2026 08:52
e28c5ce to
1189242
Compare
@JucanAndreiDaniel
JucanAndreiDaniel
force-pushed
the
stack/03-animation-playables
branch
from
June 14, 2026 08:54
1189242 to
175c6f5
Compare
@JucanAndreiDaniel
JucanAndreiDaniel
marked this pull request as ready for review
June 14, 2026 08:54
JaXt0r
JaXt0r
approved these changes
Jun 14, 2026
@JaXt0r
JaXt0r
left a comment
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Animations are working. Code looks good. I only got a few exceptions during play about Mobs and their usage. E.g., Diego is not sitting on his bench. But I don't expect it's related to the Animation rework.
@JucanAndreiDaniel
JucanAndreiDaniel
deleted the
stack/03-animation-playables
branch
June 15, 2026 03:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Rewrites the NPC animation system onto Unity's
AnimationScriptPlayablewith a Burst pose job sampling baked native pose buffers, replacing the old managed keyframe model. This is the foundation for the AI/combat work in later PRs.Changes
AnimationKeyFrame; addsAnimationPoseJob(Burst sample+blend overNativeArraypose data) andAnimationSkeleton.AnimationTracknow owns shared native position/rotation buffers (with InvertYAxisflag for sitting poses);AnimationTrackInstance` is reduced to a playbackcursor.AnimationServicebakes each.manonce: pins root X/Z to zero, storeset, computes root-motion speed, and flags sitting poses.AnimationSystemschedules the pose job through anAnimationScriptPlayablegraph; root motion is applied viaRootCollisionHandler.AnimationSystemWindowToolupdated for the new pipeline.How to test
This is still not foolproof enough, there will still be issues, but the animation doesn't seem to be a bottleneck now on the quest