当前位置:网站首页>UE4 writes the blueprint in the actor class to realize reuse
UE4 writes the blueprint in the actor class to realize reuse
2022-07-22 17:09:00 【Zhichao_ ninety-seven】
In the last blog post (UE4 The level blueprint realizes opening and closing ) It's done Open and close the door , But if there are multiple such doors in the game , This operation is very troublesome , So this blog realizes the reuse of door opening and closing logic
Final effect :
step :
1. Right click the content browser , Select blueprint class
2. Click on Actor
3. Name it Door_BP, Double click to open the blueprint class
4. Click on Add the component -》 Static mesh body components
5. Name it DoorFrame ( Doorframe )
6. Here's the picture , In turn, click , To add door frames 7. Repeat step 4~6, Add the door again
8. add to Box Colision , And it Door Put it in the same directory
9. adjustment Box The size and location of
10. Here's the picture , In turn, click , Create an event when components begin to overlap
11. Here's the picture , In turn, click , Create the event when the component ends overlapping
12. Right click , Search for time axis , To add a timeline
13. Double click to open the timeline
14. Click on Add floating point tracks Button
15. Right click Add keys to ..
16. Add another keyframe , Set the time of the first key frame to 0, Value to 0
( remind : The value of the first frame should be the same as the initial z The rotation degree of the shaft is consistent , Here's the picture )
17. Set the time of the second key frame to 2, Value to 90 (2 second rotate 90 degree )
18. Change the length to 2
19. Select the first key , Right click , Choose Auto , To smooth the line
20. take Door Drag directly to the event chart , for Door Add a reference
23. Here's the picture , Set relative rotation
24. Here's the picture , attachment
24. Right click Delta Rotation, choice Split structure pins
25. Here's the picture , Reconnect
26. Click on compile
After completion , You can drag the edited blueprint into the viewport interface to use , The effect is as shown at the beginning
If you want to achieve E Key to open and close the door , You can continue to refer to this blog :UE4 Keyboard keys realize door opening and closing
边栏推荐
猜你喜欢
LVS负载均衡群集
服务器网络性能调优案例
JSON_EXTRACT返回不正确问题
修复版动态视频壁纸微信小程序源码下载,支持多种类型流量主收益
Hande enterprise PAAS platform hzero will soon be heavily open source!
Crack PLSQL by deleting the registry
数据湖:数据湖技术架构演进
lvs看这篇就够了
Enthusiasm and expertise fly together | Microsoft's most valuable expert project, attracting Microsoft technology contributors!
Hande apaas low code platform Feida 2.3.0 release was officially released!
随机推荐
ES6 let and Const
PyGame electronic warfare simulation effect
MySQL中的日志“binlog”的三种格式这么好玩
Oracle stored procedure parameter understanding
Contract awarding and use of NPM private server
Repair version of Dynamic Video Wallpaper wechat applet source code download, supporting various types of traffic main revenue
线程系列协程原理
视觉系统设计实例(halcon-winform)-8.匹配查找
14_响应模型
汉得企业级数字化PaaS平台 HZERO 1.9.0 版本正式发布!
1840. 最高建筑高度 贪心
服务器网络性能调优案例
【专题分享】汉得企业级PaaS平台HZERO之开源专题
Qt5.9.2初次导入使用msvc2017_64编译器遇到的问题记录
[vs] trying to load a program with incorrect format
解析numpy.random.get_state()和numpy.random.set_state()
16_响应状态码
tf.random_ normal_ initializer
ffmpeg-rk3399 ffplay 学习分析
[MySQL] SQL tuning practice teaching