[Bf-committers] 2.47 showstopper bug in the BGE.
benoit.bolsee at online.be
Sat Aug 16 00:43:28 CEST 2008
The bug fix in revision 16022 for bug #17450 was wrong: the formula used
to extract scaling and rotation from the parent inverse transform was
giving incorrect results for some type of matrix, leading to wrong
position and orientation for parented objects with no scale applied:
getRotation() only works correctly if there is no scaling in the
transformation. The correct formula that follows Blender's internal math
is as follow:
MT_Vector3 scale(x.length(), y.length(), z.length());
x /= scale;
y /= scale;
z /= scale;
This bug affects 2.47 as revision 16022 was included in 2.47. It
potentially affects all games with parented objects with no scale
applied on the parent: in this situation the parent inverse node has
scaling and the formula doesn't work correctly.
I've fixed the bug in revision 16127 and I recommend to include it in
The game designer can get away with the bug by applying the scale on the
parent objects, which is often recommended in the tutorials so the
impact of this bug may be limited.
Note that 2.47 contains a number of advanced improvements in the game
engine that are not sufficiently tested. I expect more problems of that
kind but this one is particularly visible.
More information about the Bf-committers