当前位置:网站首页>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.添加如下节点,当启用输入时文本渲染组件不隐藏,禁用输入时隐藏
边栏推荐
- Queue Topic: Recent Requests
- 新人如何入门和学习软件测试?
- [Software testing] unittest framework for automated testing
- Slapped in the face: there are so many testers in a certain department of byte
- 高项 02 信息系统项目管理基础
- 数据库设计的酸(ACID)碱(BASE)原则
- This year's Qixi Festival, "love vegetables" are more loving than gifts
- ASP.NET应用程序--Hello World
- 905. 区间选点
- 2022高处安装、维护、拆除考试题模拟考试题库及在线模拟考试
猜你喜欢
[Solved] Unity Coroutine coroutine is not executed effectively
Talking about data security governance and privacy computing
今年七夕,「情蔬」比礼物更有爱
Industry Status?Why do Internet companies prefer to spend 20k to recruit people rather than raise their salary to retain old employees~
沃谈小知识 |“远程透传”那点事儿
运维监控系统之Open-Falcon
静态方法获取配置文件数据
事件解析树Drain3使用方法和解释
The usage of try...catch and finally in js
Solana NFT开发指南
随机推荐
Hard power or soft power, which is more important to testers?
Fifteen. Actual combat - MySQL database building table character set and collation
Why did they choose to fall in love with AI?
10 years of testing experience, worthless in the face of the biological age of 35
The usage of try...catch and finally in js
数据库设计的酸(ACID)碱(BASE)原则
QT: The Magical QVarient
十五. 实战——mysql建库建表 字符集 和 排序规则
Web3.0 Dapps - the road to the future financial world
How to find all fields with empty data in sql
思考(八十八):使用 protobuf 自定义选项,做数据多版本管理
Beyond YOLO5-Face | YOLO-FaceV2 officially open source Trick+ academic point full
ASP.NET应用程序--Hello World
presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer
The sword refers to Offer--find the repeated numbers in the array (three solutions)
cross domain solution
大像素全景制作完成后,推广方式有哪些?
burp安装及代理设置
[论文笔记] MapReduce: Simplified Data Processing on Large Clusters
AI + Small Nucleic Acid Drugs | Eleven Completes $22 Million Seed Round Financing