Hi am stupid and i have a math problem. I’ve been working on a goalkeeper which reads the position of the ball along his axis and plays the corresponding animation through a blend tree, i.e if the value is -1 then the keeper will dive to his right side and so on.
It all works great if am shooting from the center of the pitch and where 0 = play middle animation , but if am to shoot from sideways or if the goalkeeper is rotated to face the ball then it plays the wrong animations since am using values from the default world axis.
So my question is… how do i normalise that ball value which gets send to the blend tree so that it takes into account the directions that the forward vectors of the 2 reference points are facing, so that the value will always be 0 if they are facing directly at each-other. Or in english, how do i zero in on the ball?