S2.02 Platform blueprint creation
Lesson Summary
In this lesson, we covered:
- Organizing the project folder structure.
- Creating a new blueprint for a platform.
- Setting up components for the platform blueprint.
- Using the platform blueprint in our level.
What did we do?
✅ Updated for UE 5.4.1
Create the platform blueprint
- Inside the DungeonCrawler folder create a new one called
GameElements
. - Inside the GameElements folder create another one called
Platform
, and inside it, create the blueprintBP_Platform
by right-clicking on an empty space in the content drawer/browser, choosing Blueprint Class and selecting the Actor button.
Add the needed components to the platform blueprint
- Add a Cube component to the platform blueprint using the + Add button in the Components panel. A cube component is a Static Mesh component, but with the static mesh value setup to show a cube. Rename the component to
PlatformMesh
. - Add an InterpToMovement component to the blueprint.
Use the platform in the level
- Position the Platform blueprint in your level and use the flatten tool to create a gap.
- Select the Platform blueprint, and then in the Details panel (Windows → Details → Details 1), select the InterpToMovement component.
- Add 2 control points, by clicking on the + button. The first one should be X = 0.0, Y = 0.0, and Z = 0.0, and the second one should have the necessary value in X to cross the gap (for example, X = 1000.0, Y = 0.0, and Z = 0.0). Take into consideration that both points need to have the Position is Relative value set to True.
- Test the platform movement easily by clicking on the 3 vertical dots beside the Play button and choosing Simulate (Alt + S).
- After choosing the X value that works in your map, in the same InterpToMovement component, go to the Duration value and change it to 3 or to a value that suits your level.
- In the same component, set the Behavior Type value to Ping Pong.
Don't forget to save your progress!
Also, you can test your platform by right-clicking on any part of the level (usually near the thing you want to test) and clicking on the Play From Here button.
Hotkeys learned
Unreal Editor
Start the game in Play mode: Alt + P
Start the game in Simulate mode: Alt + S
In the Content Browser / Drawer
Create Folder: Ctrl + Shift + N
Unreal Engine Terminology
Play: The way we traditionally test the game. It is precisely what a player will experience when they play the game. The player will possess the pawn defined in the game mode, and the pawn will be spawned in a Player Start actor location if there is one; otherwise, it will use the current camera location.
Simulate: A way to test the game without creating a Pawn to possess. The game starts as usual, but because there is no pawn to be possessed, we are assigned a floating camera pawn that lets us roam around the map. Using this mode disregards any Player Start actor in the map and "spawns" us where the camera is in the editor.
Got Questions?
The UNF Games team is here for you! Members of our Private Community can ask questions about anything from this chapter by clicking on this link and creating a New Topic, where the Title starts with the Section and Video number.
Example title of new topic: [S3.12] Weird issue that I can’t solve
We know that nothing is perfect, so if the subtitles of this lesson are weird, or they don't make much sense, please let us know by making a post in this category in our community page.
Example title of new topic: [S3.12] Spanish - Weird translation issue that don’t make sense
If you have bought the course and haven't yet checked out our Private Teachable Community yet, just click on this link and see what you have been missing.
Ready to move on? Click "complete & continue" to proceed to the next lesson.