Unity: Making Stretchy-Squashy Rotations with Dot Products and A Blend Tree
Unity: Making Stretchy-Squashy Rotations with Dot Products and A Blend Tree [ insert header graphic ] This is a quick rundown on how BomBo's (the main character in The Lullaby of Life ) organic rotation system was created. This solution was created on Unity and requires basic knowledge of the Unity Engine the Animator System ( 2D Blend Trees ) Vector Math ( dot products ) This solution is straightforward and general enough to apply on similar and not-so-similar cases. The Problem One of the early requirements in the animation system for BomBo was making its rotation to organically follow the character's movement. Beyond a simple change in orientation: how to add a dynamic "twist/stretch" to make the character more alive? The Insight The twist in the character is directly proportional to the difference between the character's orientation and the input direction. This is: the more perpendicular the character (its transfor...