/// <summary> /// 配置旋转 /// </summary> void setupRotation(RuntimeCharacter.Direction d) { var rot = transform.localEulerAngles; rot.z = RuntimeCharacter.dir82Angle(d); transform.localEulerAngles = rot; }
/// <summary> /// 更新朝向 /// </summary> void updateDirection() { if (!directionController) { return; } var rot = directionController.localEulerAngles; rot.z = RuntimeCharacter.dir82Angle(direction); directionController.localEulerAngles = rot; }