Rotation “Flipping” Issues
After pulling out most of my hair, I’ve realized my rotation issues while rendering a scaleform using the DrawScaleformMovie_3dNonAdditive are related to how the native is dealing with rotation.
My best attempt at giving an example:
Using the DrawScaleformMovie_3dNonAdditive function, the scaleform frame seems to “flip” at “random rotations”. I’m raycasting to get the projection point, and using the normal to calculate the scaleforms direction.
Here is an example of the rotation before the “flip”.
Here is an example of the rotation after the “flip”. Note the similar normal/rotation values.
Opting instead to use the DrawScaleformMovie_3d function instead, I found the rotation never had a circumstance in which it “flipped”, though the initial rotation offset was different (likely preferable).
Here is an example of the rotation before the “flip”.
Here is an example of the rotation where NonAdditive would cause a rotation flip unexplainably. Note there is no rotation flip using this method.
More issues with DrawScaleformMovie_3dNonAdditive
Aside from the rotation issues, the LUA variant of this function seems to render with an undesirable “stretch” effect, where the same function (using the same arguments) in JS does not.
Here is the undesirable stretch effect caused by calling this function in LUA.
Here is the desired effect.