当前位置:网站首页>UE4官方AEC蓝图案例课程学习笔记
UE4官方AEC蓝图案例课程学习笔记
2022-07-27 21:07:00 【朗迹 - 张伟】
官方网址:https://learn.unrealengine.com/course/2938064?r=False&ts=637944176479533337
B站网址:https://www.bilibili.com/video/BV1E7411p7a3?p=1&vd_source=707ec8983cc32e6e065d5496a7f79ee6
教程介绍
- 教程以蓝图入手为主,制作了Trigger触发的自动门,射线触发的灯,编辑模式下自动吸附天花板的灯与靠近提示并能换材质的椅子
- 教程比较简单,新手建议入手学习,领略蓝图的魅力
制作自动门
- UE里,一般一个可互动的物体会封装成一个蓝图类,包含了所有模型、动作以及对外的接口。实现非常清晰的类的概念。
- 蓝图类Actor,类比于Unity的GameObject;一般的互动物体都会建立Actor
- 建立一个BP_AutoDoor

- 加入一个Box Collison,这样蓝图类里就可以使用ActorBeginOverlap和ActorEndOverlap事件(这里事件有点自动绑定好的意思)
注意:Box尽量大一点,让移动门不会离开Box的范围,不然会出现移动门开的时候,自己除角色离开的Bug
- TimeLine是随时间变化返回设定值的函数。这里为开门提供了曲线动画。结合Box碰撞体的进入与离开,实现正播与倒播的对应动作。
- TimeLine提供的是2秒,0-1的一个曲线变化,后面结合Lerp的Alpha值,实现从A值到B值的变化,这些都是常规用法。
- 案例里,获取门的位置,使用了Get Relative Transform,使用 Get Relative Location是一样的。
射线触发的灯
- UE里,角色身上、GameMode里面,Level Blueprints里面会写一些公共代码,以及Input里会设置一些动作关键字;此案例中,角色身上,需要写触发灯光开关的代码。
- 这里涉及蓝图的对象有:
(1)角色:鼠标按下,发射检测射线,并检测对象类型,是符合的对象,则向此对象发送接口动作命令Light Switch
(2)开关:设置Light Switch接口,并出全部灯光类的Switched接口命令
(3)灯光:设置Switched接,并根据FlipFlop(AB轮换),设置灯光亮度 - 射线逻辑:设置Start与End的射线距离,有接触到物体则,判断物体类别,类别正确,则发送接口命令。
物体封装动作,开放接口
自动吸附天花板
- Construction里是在编辑器里运行,实现了简单的吸附天花板的功能;如果吸附地面,只用按PageDown即可
换材质的椅子
- 结合上面的案例,不难解决
- 由碰撞体触发提示文字
- 用SetMaterial设置预设的材质
蓝图类里,可以在主窗口拖动模型或另一个蓝图,到本蓝图类;不一定要用Add Component按钮
总结:UE相比Unity,有非常严谨的封装概念;故而,建议把一个模型的Mesh、蓝图类、材质、贴图(若无重用)可以放在一起,更利于项目迁移。
边栏推荐
- Arm32 for remote debugging
- [ACTF新生赛2020]crypto-aes
- Smartrefresh nested multiple recycleview sliding conflicts and incomplete layout display
- BUUCTF-Baby RSA
- This is the most concise guide to tcpdump in history. It's enough to read this one
- Redis 哈希Hash底层数据结构
- 【C语言】通讯录(动态版本)
- Ideas, methods and steps of making folding fans with 3DMAX
- What technology is RPA process automation robot? How to realize office automation?
- RPA流程自动化机器人是什么技术?如何实现办公自动化?
猜你喜欢

给网站套上Cloudflare(以腾讯云为例)

Bank Marketing预测一个客户购买理财产品的成功率

org.junit.runners.model.InvalidTestClassError: Invalid test class ‘com.zhj.esdemo.MysqlTests‘: 1.

2022 International Conference on civil, building and Environmental Engineering (iccaee 2022)

技术认证 | 图扑软件携手华为云再创合作共赢新局面

Record the errors about formatc in R language

The first activity of togaf10 standard reading club was successfully held, and the wonderful moments were reviewed!
![[RoarCTF2019]babyRSA威尔逊定理](/img/c1/52e79b6e40390374d48783725311ba.gif)
[RoarCTF2019]babyRSA威尔逊定理

真的很难理解?RecyclerView 缓存机制到底是几级缓存?

Can Siemens PLC collect analog data of multiple slave stations in real time and wirelessly?
随机推荐
【C语言】通讯录(动态版本)
Elk log analysis system installation and deployment
CaEGCN: Cross-Attention Fusion based Enhanced Graph Convolutional Network for Clustering 2021
org.junit.runners.model. InvalidTestClassError: Invalid test class ‘com.zhj.esdemo. MysqlTests‘: 1.
2022 International Conference on civil, building and Environmental Engineering (iccaee 2022)
[December Haikou] the 6th International Conference on ships, marine and Maritime Engineering in 2022 (naome 2022)
重新定义分析 - EventBridge 实时事件分析平台发布
Redis 哈希Hash底层数据结构
Features of hardwired controller:
基于原生js实现今日新闻网站
MapReduce(三)
BUUCTF-Dangerous RSA
js数组复制速度测试220320
Reduce error demonstration
Zabbix4.0使用SNMP代理方式监控vcenter6.5
Bank marketing predicts the success rate of a customer's purchase of financial products
三次握手的Socket交互流程
Using the optical fingerprint scheme under the huiding screen, Samsung Galaxy a71 5g is listed
C # delegate usage -- console project, which implements events through delegation
Error:svn: E155010: ‘/Users/.../Desktop/wrokspace/xxx‘ is scheduled for addition, but is missing