How do you structure a blendspace to handle facing?

There are a boatload of combat animations which are functionally identical, save for facing. Take dodging as an example: theoretically, the easiest way to make a nice-looking dodge would be to create two animations: forward roll, and right roll (back and left roll can be achieved by mirroring the first two). This leaves us with an up, down, left, and right variant which need to be blended somehow. It’s almost possible to do this on a single-dimensional blend fed by a dot product: 1 = full front roll, -1 = full back roll. This falls through on the sides, however, as a dot product check doesn’t let us distinguish left facing from right facing.

Another possibility would be to translate the player’s current facing to a float between 0-360, with front roll at 0 and 360, right at 90, rear at 180, and left at 270, but I hate having to place the same animation twice in a blend- this seems like an insanely common problem to have, is there a standard solution that I’m missing?

I place the same anim twice in the Blend, it’s not like it causes problems. There’s not, AFAIK, a substantial increase in memory consumption since it just refers to the same anim which is already loaded into memory, and any time you change that anim it changes all instances of it so it’s not like it creates any additional work for the developer.

Oh hey, that’s better… for some reason I assumed it would retain references to two completely separate animations. Do you think sticking with the one-dimensional blend is the way to go in terms of actually nailing the facings? It’s simple, which I like, but I’m largely ignorant of Persona’s tools so I keep being paranoid that I’m solving a problem something else in the API already does more elegantly.

I would stick with the straight line. You can use a 2D blendspace for this (F/B on one axis, L/R on another) but this is probably not helpful unless you have some need for a “null” anim (i.e. dodge forward, backward, left, right, and no-direction). Using a 2D blendspace will make for issues at the corners because it uses linear blending rather than circular (it doesn’t normalize the weights for a unit vector input, so halfway between forward and left won’t fall exactly on the line for left-forward and you’ll get unexpected behavior)… This can be corrected by placing “corner” anims in the actual corners but using a linear “angle” approach is much easier to manage and get looking right.