zoukankan      html  css  js  c++  java
  • 利用unity3d自带的CharacterController包制作第一人称控制模型的简单Demo

      1、首先打开unity3d创建一个新的项目。在新项目中创建Plane和Directional light平行光,Plane作为地面。

      2、在项目中导入CharacterController包。把3rd Person Controller模型放到Plane上。

      3、把3rd Person Controller模型上的ThirdPersonController脚本和ThirdPersonCamera脚本Remove掉。

      4、在3rd Person Controller模型上添加CharacterMotor脚本、FPSInputController脚本和MouseLook脚本。

      5、把3rd Person Controller模型上MouseLook脚本的Axes属性改为Mouse X。

                       

      6、把Main Camera作为3rd Person Controller的子对象,调整Main Camera的位置到3rd Person Controller的头部,使Main Camera与3rd Person Controller朝向一致。

      7、在Main Camera上添加MouseLook脚本,把MouseLook脚本的Axes属性改为Mouse Y。

       

  • 相关阅读:
    ios 重构笔记
    ios uiwindow笔记
    ios静态库笔记
    ios app提交之前需要哪几个证书
    int、long、long long取值范围
    字节概述
    序列化概述
    LeetCode 最大连续子数列值
    198. LeetCode 打家劫舍
    git自定义关键字
  • 原文地址:https://www.cnblogs.com/jj391/p/4768732.html
Copyright © 2011-2022 走看看