UE5 study notes (4) - basic operations of several blueprints

Table of contents

How to activate when an object touches

Three ways to move objects:

Node usage for common conditional statements

How to print out information on the screen


How to activate when an object touches


1. Add Collision to the object

2. After selecting the collider, you can see various trigger events in Details.

For contact, you can use On Component Begin Overlap and On Component End Overlap, which represent the start of overlap and the end of overlap.

3. Click the green plus sign to create a node in the blueprint.

(The red nodes in the blueprint will run automatically, and all processes must start from the red nodes. The color of the nodes and the mark in the upper left corner will be sorted out in the follow-up topic)

Pull the Other Actor, that is, the overlapping object out of the line, search for the Cast To overlapping object name, and start the process when the collision body overlaps with this object.

4. After the collision, you can run your own process, or call the other party's process.


Three ways to move objects:


1. Divide the 3-dimensional coordinate value, correct x, y, and z respectively and pass it into Move Component To

2. Combine the processed three values, and then transfer them to Move Component To as a whole

3. Fill in the value directly to Move Component To (not recommended)


Node usage for common conditional statements


1. Add Branch to the process

2. Search condition judgment operators, such as >, >=, <, <=, =, add judgment nodes.

The two values ​​on the left of the decision node are connected by an operator, and the result of True or False can be output, so that Branch can be divided into two branch processes.


How to print out information on the screen


1. Add Print String to the main process

2. You can directly write the printed text, or pass in the value.

The color of the line represents the incoming and outgoing content type. If conversion is allowed, a conversion node will be automatically generated when connecting.

(The correspondence between colors and types will be specially arranged, you can first refer to the color correspondence in the variable type drop-down box)

Guess you like

Origin blog.csdn.net/weixin_35106335/article/details/127013141