So I have 2 blendshape animations embedded to my object (a plane mesh exported from Maya) and I want to interpolate between them. Each animation takes values between 0 to 100. So the overall animation is 0 to 100. The animations deform the mesh.
Depending on where the user pressed I want the animations to be interpolated. Here is my JS script for blending the animations:
object.SetBlendShapeWeight(0,hit.point.z*currentLocation);
object.SetBlendShapeWeight(1,(1.00-hit.point.z)*currentLocation);
where hit.point.z is the point on the z axis the user pressed on. It takes values between 0 to 1. Also currentLocation is the overall animation location (0 to 100).
So far so good right? The problem is that when currentLocation >70 and hit.point.z =0.5 then the animated is deformed pretty ugly. The reason is that by adding/interpolating the 2 animations above it deforms the object more than it should be. From my understanding a real blendshape should be like: hit.point.z * object.SetBlendShapeWeight(0,currentLocation)
and (1.00-hit.point.z)*object.SetBlendShapeWeight(1,currentLocation)
. That would be a true interpolation. In any case I was wondering if you have any ideas on how to tackle this issue. I would really appreciate it.