当前位置:网站首页>[ue5] blueprint making simple mine tutorial
[ue5] blueprint making simple mine tutorial
2022-07-02 10:00:00 【Qiao'an fish】
This is a small effect that I researched myself , But it can't cope with complex situations .
The effect of Mines —— The player presses the key to place a mine ,AI Explosion after encountering .
Split the whole process :
1. The player presses the key to place the mine model .
2.AI After encountering mines ,AI disappear .
3. Mines play explosion effects , Disappearance of Mines .
One 、 Press the key to place mines
1. Make mine blueprints
Create a Actor The blueprint , Add any MESH Components as models .
Add trigger , You can choose any shape .
( When touching this trigger , Play the landmine incident )
The size of the trigger is larger than the model , Otherwise, when the model collides ,AI Unable to trigger .
2. Press the key to place mines
Open the player character blueprint , Right click input E, stay “ Keyboard events ” Add “E” event .
Press E Key will trigger this event .
Drag and drop E The event Pressed Pin , establish “ Generate Actor” function .


It's generating Actor Of class Choose the mine blueprint we created 
The name of the function will show the class we selected .
Next, we need to give the location of this function , It can be generated at the current player position .
Create get Actor The position function , And generate Actor Of Spawn Transform Pin to pin , A vector transformation will automatically appear in the middle .
After placement , You will find the camera bounced off , I can't see the players .
This is because mines collide , Play the character away .
Select from the mine blueprint mesh Components , In the details panel, change the collision preset to NoCollision, The collision of mines is closed .
Play again , This time the mine didn't bounce the player away .
Two 、AI Hit a mine explosion
1. establish AI Communicate with mines
We can use AI The trigger of the mine overlaps with the trigger of the mine to create an explosion event , however AI Will be deleted after triggering , In order to ensure that both disappear at the same time , Still need to be in AI Establish blueprint communication with mines , To inform the mine explosion .
Right click > The blueprint > Blueprint interface , Establish blueprint communication .
The name IF_ The explosion .
Open blueprint communication , Modify the function name as explosion.
such , Blueprint communication is established .
2.AI The explosion
open AI Character blueprint , Select capsule components , Add the event when components begin to overlap in the details panel .
Execute pins when dragging components to start overlapping , Create what we just set Explosion function ,other actor Connect with the goal .
In this way, the mine is notified to start the explosion .
Similar to the method of generating mines , stay AI The current position generates an explosion effect ,Class Choose your own explosion Blueprint is enough .
And then to delete AI Model , establish Delete Actor function .
AI The explosion effect of is finished :
3、 ... and 、 Mine explosion
Just make the mine model disappear .
Open mine blueprint , We are going to call the explosion . Input explosion, Note that we have to choose events Explosion.
Destroy directly Actor That's it .


The effect is achieved !
I said before. , This is just a simple effect , If there are multiple colliders , Will trigger an explosion .
So you also need to filter triggers .
边栏推荐
- 2837xd 代碼生成——StateFlow(4)
- C language strawberry
- TD联合Modelsim进行功能仿真
- 2837xd 代码生成——StateFlow(3)
- Matlab生成dsp程序——官方例程学习(6)
- MySQL default transaction isolation level and row lock
- Read Day6 30 minutes before going to bed every day_ Day6_ Date_ Calendar_ LocalDate_ TimeStamp_ LocalTime
- Alibaba cloud Prometheus monitoring service
- 在SQL注入中,为什么union联合查询,id必须等于0
- 【虚幻】过场动画笔记
猜你喜欢

Record the interesting process of using Xray for the first time

Tee command usage example

Introduction et prévention des essais de pénétration

Eslint reports an error

MySQL default transaction isolation level and row lock

PI control of three-phase grid connected inverter - off grid mode

Junit5 支持suite的方法

Inverter Simulink model -- processor in the loop test (PIL)

Skywalking理论与实践

Idempotent design of Internet API interface
随机推荐
Error reporting on the first day of work (incomplete awvs unloading)
Bugkuctf-web16 (backup is a good habit)
在SQL注入中,为什么union联合查询,id必须等于0
Image recognition - data annotation
C language strawberry
2837xd code generation module learning (2) -- ADC, epwm module, timer0
2837xd 代码生成——StateFlow(4)
2837xd 代码生成——补充(3)
Save video opencv:: videowriter
Summary of demand R & D process nodes and key outputs
Tee command usage example
职业规划和发展
BugkuCTF-web24(解题思路及步骤)
2837xd code generation - Supplement (1)
About the college entrance examination
2837xd 代码生成——补充(2)
Image recognition - Data Acquisition
How to handle error logic gracefully
MySQL index
图像识别-数据标注