def _rotate(self, ch, xyzrot):
orientation = self._convert_orientation(ch, xyzrot)
if ch.rotation_mode is bge.logic.ROT_MODE_QUAT:
ch.rotation_quaternion = mathutils.Quaternion(ch.rotation_quaternion) * orientation
else:
ch.rotation_euler = ch.rotation_euler.rotate(orientation)
评论列表
文章目录