# AnimBlendTreeDirectional2D

Class · extends [`AnimBlendTree`](https://api.playcanvas.com/engine/classes/AnimBlendTree.md) · category: Animation

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/framework/anim/controller/anim-blend-tree-2d-directional.js#L16

An AnimBlendTree that calculates its weights using the 2D directional algorithm from chapter 6 of
[Rune Skovbo Johansen's thesis](https://runevision.com/thesis/rune_skovbo_johansen_thesis.pdf).

The children's points are treated as directions from the origin, so the weights follow the
angle and magnitude of the current parameter point. Use it when the two parameters form a
direction, such as a movement vector driving an eight-way locomotion set.

## Inherited from [AnimBlendTree](https://api.playcanvas.com/engine/classes/AnimBlendTree.md)

- `new AnimBlendTreeDirectional2D(state: AnimState, parent: AnimBlendTree | null, name: string, point: number | Vec2, parameters: string[], children: any[], syncAnimations: boolean, createTree: Function, findParameter: Function)`
