当前位置:网站首页>UE4 将蓝图写在Actor类里面 实现复用
UE4 将蓝图写在Actor类里面 实现复用
2022-07-22 04:46:00 【Zhichao_97】
在上一篇博客中(UE4 关卡蓝图实现开关门)已经实现了 开关门,但是如果游戏中有多个这样的门,用这种操作就非常麻烦,于是这篇博客来实现开关门逻辑的复用
最终效果:
步骤:
1.右键内容浏览器,选择蓝图类
2.点击Actor
3.命名为Door_BP,双击打开这个蓝图类
4.点击 添加组件-》 静态网格体组件
5.命名为DoorFrame (门框)
6.如下图,依次点击,来添加门框 7.重复步骤4~6,再次添加门
8.添加Box Colision ,将其和Door放在同一级目录下
9.调整 Box 的大小和位置
10.如下图,依次点击,创建组件开始重叠时的事件
11.如下图,依次点击,创建组件结束重叠时的事件
12.点击鼠标右键,搜索 时间轴,来添加时间轴
13.双击打开时间轴
14.点击 添加浮点型轨迹 按钮
15.鼠标右键点击 添加关键帧到..
16.再添加一个关键帧,将第一个关键帧的时间设为0,值设为0
(提醒:第一帧的值要和初始z轴的旋转度数保持一致,如下图)
17.将第二个关键帧的时间设为2,值设为90 (2秒 旋转90度)
18.将长度改为2
19.选择第一个关键帧,点击鼠标右键,选择自动,来让线变得平滑
20.将Door直接拖拽到事件图表中,来为Door添加一个引用
23.如下图,设置相对旋转
24.如下图,连线
24.鼠标右键点击Delta Rotation,选择 分割结构体引脚
25.如下图,再连线
26.点击 编译
完成后,就可以将编辑好的蓝图拖入视口界面中使用,效果如开头所示
如果想实现 E 键来开关门,可以继续参考这篇博客:UE4 键盘按键实现开关门
边栏推荐
- JVM: parental delegation mechanism for class loading
- 招股书写了“元宇宙“318次!飞天云动再战港股“元宇宙第一股“
- Li Kou daily question - day 41 -125. Verify the palindrome string
- PHP QR code decoding qrreader class | QR code image to string
- Sequence traversal BFS (breadth first)
- How can the easycvr platform access special devices without authentication?
- Fundamentals of action theory
- Switch and router technology: OSPF route redistribution, OSPF NSSA area and OSPF virtual link
- Luogu_ P1112 wave number_ Thinking_ Base / construction / enumeration
- 关于promise then的连续链式使用问题
猜你喜欢
BUUCTFReservewp(3)
交換機與路由器技術:標准ACL、擴展ACL和命名ACL
AlterNet Studio 8.1 Crack
ECCV 2022 | 修正FPN带来的大目标性能损害:You Should Look at All Objects
Bryntum Scheduler Pro 5.0.6 \Gantt\Crack
stm32使用各种传感器的教程
正则表达式相关
Fundamentals of machine learning (5) image outline
Simulation Implementation of string
【Leetcode周赛--哈希表数对】6164.数位和相等数对的最大和
随机推荐
postgreSQL中update set a=(select ) 应该如何写?
Methods of checking the ranking of papers and periodicals
nested subqueries
[ssm]ssm integration ② (development of functional modules)
Sort -- insert sort and Hill sort in sort
Switch and router technology: static NAT, dynamic NAT, pat and port mirroring
What are the requirements for docking with the third-party payment interface?
JVM memory model: PC program counters
交换机与路由器技术:OSPF路由重分发、OSPF的NSSA区域和OSPF虚链路
理解递归与迭代
Gold warehouse database kmonitor usage guide --2. monitoring indicators
mysql 数据库列拼接查询写法
Informatics Olympiad all in one 1977: [08noip popularization group] stereogram | Luogu p1058 [noip2008 popularization group] stereogram
Win10 系统一天蓝屏好多次,怎么解决?
Beautify multiple digits
The competition of trillion market value public chain is white hot. Is there still a chance for the new public chain?
IBM的免费机器怎么装宝塔
C语言程序练习——(写一个函数,它的原形是int continumax(char *outputstr,char *intputstr))
[ssm]ssm integration ③ (interface test)
High number_ Chapter 2 differential calculus of multivariate functions_ Partial derivatives of implicit functions