Game Development Reference
In-Depth Information
pending on the selected value, the
aBlockMaterial
variable will be set to a differ-
ent material. This
aBlockMaterial
variable is the one that will be used to set the
material of each created block in each iteration of the loop for each row.
•
addRowX:
I named this
X
here, but in fact, there are five functions to add the
rows; they are
addRow1
,
addRow2
,
addRow3
,
addRow4
, and
addRow5
. All of
them are responsible for adding rows; the main difference is the start point of
adding the row; each one of them uses a different billboard transform, starting
from
firstRowPoint
and ending with
fifthRowPoint
. You need to connect your
first node as
Add Static Mesh
and set its properties as any other static mesh. You
need to set its material to the emissive one. Set
Static Mesh
to
Shape_Pipe_180
,
give it a
brickPiece
tag, and set its
Collision
options to
Simulation Generates
Hit Events
and
Generate Overlap Events
to
True
. Also,
Collision Preset
has to
be set to
Block All
to act in the same manner as the walls from the layout blue-
print and receive the hit events, which will be the core of the ball detection. This
created mesh will need a transform point to be instantiated in its cords. This is
where you will need to pick the row point transform reference (depending on your
row, you will select the point number), add it to a
Make Transform
node, and fi-
nally, set the new transform
Y Rotation
to
-90
and its
XYZ scale
to
0.7, 0.7, 0.5
to fit the correct size and flip the block to have a better convex look.
This second part of the
addRow
event should use the
ChooseRandomMaterial
custom
event that you already made to select a material from among six random ones. Then, you
Search WWH ::
Custom Search