当前位置:网站首页>UE4 第一人称角色模板 添加蹲伏功能
UE4 第一人称角色模板 添加蹲伏功能
2022-08-05 03:29:00 【Zhichao_97】
效果:

步骤:
1.点击 设置-》项目设置

2.找到 引擎-》输入 添加一个操作映射,从而让按键盘c时能够使角色蹲伏

3.创建如下节点,使得按下键盘C键时,能够修改角色的行走速度,蹲伏行走速度、最大行走速度为浮点型变量

4.创建一个时间轴

设置时间轴:两个关键帧分别为(0,0)和(0.5,1)

5.获取一个对相机的引用

希望让相机及其子项的位置降低从而达到蹲伏的效果,因此需要设置相机的相对位置

6.检查一下相机一开始的位置 ,将其填入插值(向量)节点中

7.继续在插值节点中设置蹲伏后的相机位置,xy轴不变,减小z的值

此时角色已经可以蹲伏,但是碰撞体没有变化,因而无法通过高度较矮的洞穴之类的通道,因此需要改变碰撞体的高度
8.获取胶囊碰撞体的引用

9.设置胶囊碰撞体变为原来高的一半

10.新建一个插值节点

11.让胶囊体的高度从一开始的96,变为50

边栏推荐
- This year's Qixi Festival, "love vegetables" are more loving than gifts
- Walter talked little knowledge | "remote passthrough" that something
- Open-Falcon of operation and maintenance monitoring system
- Industry Status?Why do Internet companies prefer to spend 20k to recruit people rather than raise their salary to retain old employees~
- 告白数字化转型时代,时速云镌刻价值新起点
- Shell script: for loop and the while loop
- Package zip is not available, but is referred to by another package.
- [Paper Notes] MapReduce: Simplified Data Processing on Large Clusters
- You may use special comments to disable some warnings. 报错解决的三种方式
- Initial solution of the structure
猜你喜欢

银行数据采集,数据补录与指标管理3大问题如何解决?

数据库设计的酸(ACID)碱(BASE)原则

Solana NFT开发指南

龙蜥社区第二届理事大会圆满召开!理事换届选举、4 位特约顾问加入

On governance and innovation, the 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum came to a successful conclusion

告白数字化转型时代,时速云镌刻价值新起点

Getting Started with Kubernetes Networking

Use Unity to publish APP to Hololens2 without pit tutorial

Beyond YOLO5-Face | YOLO-FaceV2 officially open source Trick+ academic point full

新人如何入门和学习软件测试?
随机推荐
新人如何入门和学习软件测试?
burp安装及代理设置
Dynamic management of massive service instances
Common open source databases under Linux, how many do you know?
Details such as compiling pretreatment
2022高处安装、维护、拆除考试题模拟考试题库及在线模拟考试
[TA-Frost Wolf_may-"Hundred Talents Project"] Graphics 4.3 Real-time Shadow Introduction
Ffmpeg - sources analysis
事件解析树Drain3使用方法和解释
21天学习挑战赛(2)图解设备树的使用
冰蝎V4.0攻击来袭,安全狗产品可全面检测
Detailed and comprehensive postman interface testing practical tutorial
rpc-remote procedure call demo
Flink 1.15.1 Cluster Construction (StandaloneSession)
Based on holding YOLOv5 custom implementation of FacePose YOLO structure interpretation, YOLO data format conversion, YOLO process modification"
【七夕节】浪漫七夕,代码传情。将爱意变成绚烂的立体场景,给她(他)一个惊喜!(送代码)
You may use special comments to disable some warnings. Three ways to report errors
【软件测试】自动化测试之unittest框架
The pit of std::string::find return value
[Solved] Unity Coroutine coroutine is not executed effectively