private void RotBox(PlayerEntity player, float deltaTime, PostureInConfig postureInConfig, ICharacterControllerContext controller) { //旋转包围盒 controller.SetCurrentControllerType(postureInConfig); controller.SetCharacterPosition(player.position.Value); controller.SetCharacterRotation(player.orientation.ModelView); controller.Rotate(player.orientation.RotationYaw, deltaTime); }
/// <summary> /// 旋转角色 /// </summary> /// <param name="player"></param> /// <param name="deltaTime"></param> private static void RotateCharacter(PlayerEntity player, float deltaTime) { ICharacterControllerContext controller = player.characterContoller.Value; controller.Rotate(player.orientation.RotationYaw, deltaTime); }