0% found this document useful (0 votes)
19 views81 pages

GPhy UELab2 IntroToLevelBlueprints 211024

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views81 pages

GPhy UELab2 IntroToLevelBlueprints 211024

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 81

GAME PHYSICS

UE Lab2 : Introduction to Level Blueprints


ver 211024
© 2021 Ya Ping Wong, All Rights Reserved
We are about to create a new level.
You may first create a new project based on the Third Person template, or
you may start with what you have created in earlier lab.
Select the VR-Basic template.
Note: The static meshes in this template will
have the “Simulate Physics” enabled by default.
1. Select all the Ball, Cube and Pyramid static meshes.

2. Hit ‘W’ key or press this to go to translate mode

3. Press ALT key and left drag the blue arrow upwards to duplicate the objects
4. Hit ‘E’ key or press this to go to rotate mode

5. Left drag one of these to rotate the objects


Repeat these steps to duplicate, translate and rotate these objects.
Press “Play” or ALT-P key …
All the objects would drop down.
Press “Stop” or press Escape key …
All the objects would go back to original locations.
Zoomed out.
Select one of the static meshes, and go to the Details panel,
you will notice that the “Simulate Physics” is enabled by default
in this VR-Basic project template.
Select “Simulate” or press ALT-S key …
Select all the Ball, Cube and Pyramid static meshes and
press “K’ to keep the simulation changes.
Or you can right-click to select “Keep Simulation Changes”.
Press “Stop” or press “Escape” key.
All the objects now stay on the floor.
Search for Radial Force Actor
Drag a Radial Force Actor into the level editor.
Make sure the Radial Force Actor is selected.
Change the radius to cover the whole room.
Set Impulse Strength to something large value.
Enable Impulse Vel Change.
You may experiment suitable values later.
Press CTRL-S key to save.
Take note of the location of the new Map/Level.
This is where you can find this new level if you
have closed the UE and come back again.
Let’s add a female mannequin
physics asset …
Let’s add few more female or male
mannequins physics asset.
Viewed from a different perspective..
Select the “Player Start” object and move and
rotate it to a different location and
orientation looking at the scene.
Select “Selected Viewport” mode of “Play” …
You may move around and interact with the level
using the player character.
Press “Escape” key to end.
Open Level Blueprint …
Select the Radial Force actor in the level editor and
right click an empty spot in the level blueprint …
You may delete these event nodes that we do not need
for the time being. Highlight and press the DEL key.
Let drag the pin and release, then search
for “Force Component” and select.
The “Force Component” basically is the
sub-component of the Radial Force actor
that we wish to communicate.
We want the “Force Component” to fire an impulse.
We want to bind the key press event “F’ to the firing action.
Make sure the execution pin is connected.
Press “PLAY”.
Try press “F” key a few tiimes. …
Things are flying around, but …
ouucchh… our player character got blown away.
Navigate to the ThirdPerson Character blueprint,
double click on it or right lick to select “Edit”.
Select Capsule Component (Collision Cylinder)
and tick to ignore radial impulse and force.
Press “Play” and press “F’ key a few times, you will find that the
radial impulse force no longer affect the player character.
We want to modify the camera view. Navigate to
the ThirdPerson Character blueprint, double
click on it or right lick to select “Edit”.
Move the Follow Camera to the location as shown.
After you press “Play”, you will notice the camera is
now just behind the player character’s head.
Go back to level editor, and create a new
node “Spawn Emitter At Location”
Click at “Select Asset” …
Select the “P_Explosion” particle system
from the StarterContent.
Set the location of the particle system by routing the Force
Component’s location as its input, then scale the emitter as shown.
Press “Play” then press “F’ key a few times, you can now see the explosion.
Let’s rearrange the nodes and add an explosion sound as shown.
If you have selected the Debug
Filter and press “Play” at level
editor, you will be able to see
the simulation signals in the
level blueprint.
Let’s blow away al lthe mannequins,
then we will go to the next level….
On event Begin Play, we want to get the
number of all Skeletal Mesh actors …
and promote it to a private variable
that we can reference later.
Create a Trigger Volume to detect
how many Sketal Mesh actors have
left the game space.
Resize the volume to enclose the
game space.
With Trigger Volume selected at the
level editor, right click at an empty
spot of the level blueprint …
Enable Generate Overlap Event for the Skeletal Mesh actors.
After all the mannequins have been blown out of
the game space, the next level would be executed.
This tutorial is adopted from the tutorial from the
official website of Unreal Engine below.

References:
Unreal Editor Fundamentals - Actors and Blueprints
https://learn.unrealengine.com/course/3737865

Unreal Engine Official Website


https://www.unrealengine.com/en-US/

You might also like