Blender Git Commit Log
Git Commits -> Revision 005c5e6
Revision 005c5e6 by Benoit Bolsee (master) September 23, 2008, 20:07 (GMT) |
BGE bug #17657 fixed: dRotY doesn't work properly after 90 degrees rotation. This problem is caused by discontinuities in the conversion orientation matrix -> euler angles: the angle sign can switch and thus the direction of the rotation produced by the dRot Ipo. To avoid this bug, the matrix->euler conversion must be avoided during the game. I took the following approach that is compatible with Blender (identical effect in the game and in the 3D view): - no change in Add mode: Rot and dRot are treated as additional rotation to the orientation at the start of the Ipo. There is no matrix->euler conversion and thus no discontinuities. - Rot Ipo are treated as absolute rotation. All 3 axis should be specified but if they are not, the startup object orientation will be used to set the unspecified axis. By doing a matrix-> euler conversion once at the start, the discontinuities are avoided. If there are also dRot curves, they are treated as delta of the corresponding Rot curve or startup angle. - dRot Ipo are treated as Add mode in Local axis. Note about Add mode: Rot and dRot curves are treated identically during the game. However, only dRot curves make sense because they don't interfere with the object orientation in the 3D view. |
Commit Details:
Full Hash: 005c5e63711e92677547ec2477238fd1f016fb30
SVN Revision: 16706
Parent Commit: 3cf87f4
Lines Changed: +85, -36