playcanvas / playcanvas/engine
Anim Blend Tree accessor override
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
A followup on #6211:
Anim Blend Tree overrides the inherited weight accessor from Anim Node:
Solution:
The accessor should be removed from the Anim Blend Tree (or a setter added), and the Anim Node should add a conditional calculateWeights call:
get weight() {
this.calculateWeights?.();
return this._parent ? this._parent.weight * this._weight : this._weight;
}
Repro:
https://playcanvas.com/project/1205544/overview/blend-tree-forked
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked definitions in src/framework/anim/controller/anim-blend-tree.js and src/framework/anim/controller/anim-node.js, then compare the inherited and overriding weight accessors. Verify the change against the linked blend-tree reproduction; done means the accessor behavior is consistent and the reported blend-tree issue no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100