コード例 #1
0
 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);
 }
コード例 #2
0
        /// <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);
        }