Disappearing Platform Loop
Platforms that appear and disappear periodically are a staple for platforming game modes like obstacle courses. They require players to time their jumps to make it to the next platform. If they miss, they’ll fall and have to start over.
This example shows how to create a disappearing platform using Scene Graph and a Verse-authored component. Compare this to the Verse-authored device implementation of the same concept in Disappearing Platform on Loop.
Making Platforms Disappear
Follow these steps to create a disappearing platform using Scene Graph:
- Add an entity to your scene named DisappearingPlatform. See Working with Entities and Components to learn more about adding entities and components to your scene.
- Add the mesh_component to your disappearing platform entity, and set the mesh to cube.
- Create a new Verse component named
disappear_on_loop_component, add the component to your disappearing platform entity and save the entity. To learn how to create your own component, see Creating Your Own Component Using Verse. - Open your
disappear_on_loop_componentin VS Code to edit it in the following steps. - Add an editable
floatproperty to the component namedDuration. This determines how long the platform should be shown before it’s hidden, and how long it’s hidden before it appears again.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.