def get_tmatrix(self): c = self.get_center() tmatrix = Matrix44.identity() # tmatrix = Matrix44.z_rotation(math.radians(self.rotation)) tmatrix.translate += Vector3(-c.x, -c.y, 0) tmatrix.translate += Vector3(self.world_pos.x, self.world_pos.y, 0) # z_rotation_matrix = Matrix44.z_rotation(math.radians(self.rotation)) # z_rotation_matrix.invert() # tmatrix *= z_rotation_matrix # Can't get rotation working :( # Working: # tmatrix = Matrix44.translation(self.world_pos.x, self.world_pos.y, 0) return tmatrix