Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Fix object matrix when replacing mesh.
Previously the mesh user matrix, the matrix used in rendering, was updated in KX_GameObject::UpdateBuckets. But only when the scene graph node was modified. This doesn't covered a case: if the object mesh is replaced and that the object doesn't move. In this case the matrix is left uninitialized as the mesh user is recreated. To solve this issue an initialization of the matrix is proceeded into AddMeshUser. The other datas in RAS_MeshUser don't need this behaviour because they are update without condition in UpdateBuckets.
- Loading branch information