当前位置:网站首页>UE4 通过互动(键盘按键)开门
UE4 通过互动(键盘按键)开门
2022-08-05 03:29:00 【Zhichao_97】
在上一篇博客中(UE4 通过重叠事件开启门)已经实现了靠近门门自动打开的效果,本篇博客要实现的效果是:玩家操控的角色靠近门时,门会显示提示文本,玩家根据提示的信息按下键盘相应的键时,门会打开和关闭。
效果:
步骤:
1.复制一份BPC_Door_OverLap,命名为BPC_Door_Interact,BPC_Door_OverLap的蓝图内容可以参考上一篇博客
2.打开设置-》项目设置
3.添加一个操作映射,表示按下键盘E时触发Interact
4.打开BPC_Door_Interact,添加如下节点
5.添加启用输入和禁用输入节点
6.添加获取玩家控制器,删除开门、关门节点
7.添加Flip Flop节点,表示第一次输入时执行A,第二次执行B,第三次执行A....
8.添加开门关门节点
9.添加两个文本渲染组件放在门的两侧,文本的值设为“E”
在细节面板中勾选游戏中隐藏,表示默认文字是隐藏的
10.将文本渲染组件拖入,从而获取对文本渲染组件的引用
11.添加如下节点,当启用输入时文本渲染组件不隐藏,禁用输入时隐藏
边栏推荐
- 数组常用方法总结
- The most effective seven performance testing techniques of software testing techniques
- shell脚本:for循环与while循环
- Use Unity to publish APP to Hololens2 without pit tutorial
- What is the difference between SAP ERP and ORACLE ERP?
- How to find all fields with empty data in sql
- ffmpeg pixel format basics
- 开发Hololens遇到The type or namespace name ‘HandMeshVertex‘ could not be found..
- 905. Interval selection
- Solana NFT开发指南
猜你喜欢
论治理与创新,2022 开放原子全球开源峰会 OpenAnolis 分论坛圆满落幕
Developing Hololens encountered The type or namespace name 'HandMeshVertex' could not be found..
21 Days Learning Challenge (2) Use of Graphical Device Trees
Android 面试题——如何徒手写一个非阻塞线程安全队列 ConcurrentLinkedQueue?
Use SuperMap iDesktopX data migration tool to migrate map documents and symbols
Principle and Technology of Virtual Memory
Talking about data security governance and privacy computing
如何在WordPress中添加特定类别的小工具
Dynamic management of massive service instances
On governance and innovation, the 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum came to a successful conclusion
随机推荐
Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors
token、jwt、oauth2、session解析
ASP.NET应用程序--Hello World
Is your data safe in this hyperconnected world?
MRTK3开发Hololens应用-手势拖拽、旋转 、缩放物体实现
[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters
用CH341A烧录外挂Flash (W25Q16JV)
Based on holding YOLOv5 custom implementation of FacePose YOLO structure interpretation, YOLO data format conversion, YOLO process modification"
Kubernetes 网络入门
The most effective seven performance testing techniques of software testing techniques
Leading the highland of digital medicine, Zhongshan Hospital explores to create a "new paradigm" for future hospitals
YYGH-13-客服中心
调用阿里云oss和sms服务
Package zip is not available, but is referred to by another package.
Swing有几种常用的事件处理方式?如何监听事件?
Open-Falcon of operation and maintenance monitoring system
2022.8.4-----leetcode.1403
今年七夕,「情蔬」比礼物更有爱
如何在WordPress中添加特定类别的小工具
数组常用方法总结