当前位置:网站首页>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.添加如下节点,当启用输入时文本渲染组件不隐藏,禁用输入时隐藏

边栏推荐
- 21天学习挑战赛(2)图解设备树的使用
- Spark基础【介绍、入门WordCount案例】
- ffmpeg 像素格式基础知识
- The pit of std::string::find return value
- Queue Topic: Recent Requests
- 【已解决】Unity Coroutinue 协程未有效执行的问题
- Details such as compiling pretreatment
- Mathematics - Properties of Summation Symbols
- rpc-remote procedure call demo
- Industry Status?Why do Internet companies prefer to spend 20k to recruit people rather than raise their salary to retain old employees~
猜你喜欢

【 genius_platform software platform development 】 : seventy-six vs the preprocessor definitions written cow force!!!!!!!!!!(in the other groups conding personnel told so cow force configuration to can

Solana NFT开发指南

After the large pixel panorama is completed, what are the promotion methods?

MRTK3 develops Hololens application - gesture drag, rotate, zoom object implementation

The second council meeting of the Dragon Lizard Community was successfully held!Director general election, 4 special consultants joined

基于生长的棋盘格角点检测方法
![[论文笔记] MapReduce: Simplified Data Processing on Large Clusters](/img/89/8adef42b0cfd154e6fa7205afaeade.png)
[论文笔记] MapReduce: Simplified Data Processing on Large Clusters

Use SuperMap iDesktopX data migration tool to migrate map documents and symbols

presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer

运维监控系统之Open-Falcon
随机推荐
Confessing the era of digital transformation, Speed Cloud engraves a new starting point for value
Swing有几种常用的事件处理方式?如何监听事件?
Summary of domestic environments supported by SuperMap
高项 02 信息系统项目管理基础
iMedicalLIS监听程序(2)
Increasing leetcode - a daily topic 1403. The order of the boy sequence (greed)
大像素全景制作完成后,推广方式有哪些?
达梦8数据库导出导入
Distributed systems revisited: there will never be a perfect consistency scheme...
事件解析树Drain3使用方法和解释
cross domain solution
Leading the highland of digital medicine, Zhongshan Hospital explores to create a "new paradigm" for future hospitals
Industry Status?Why do Internet companies prefer to spend 20k to recruit people rather than raise their salary to retain old employees~
How to Add Category-Specific Widgets in WordPress
思考(八十八):使用 protobuf 自定义选项,做数据多版本管理
Dynamic management of massive service instances
leetcode-每日一题1403. 非递增顺序的最小子序列(贪心)
Flink 1.15.1 Cluster Construction (StandaloneSession)
【已解决】Unity Coroutinue 协程未有效执行的问题
Step by step how to perform data risk assessment