Hands-On Challenge Overview
This challenge introduces you to remixable worlds. A remixable world is a world created by creators like you that allow other creators to take and modify. In this challenge we will be creating a basic melee target practice experience that will allow you and other remixers to quickly swap out meshes and adjust variables to suit the new mesh.
You’ll learn how to:
- Develop your mechanics in a modular way.
- Structure your mechanics for easy modifications.
- Add guidance for potential remixers.
- Publish your world as a remixable world.
Estimated Time: 30 min
What You’ll Need:
- https://developers.meta.com/horizon-worlds/learn/documentation/save-optimize-and-publish/horizon-remix-worlds
- Remix the “Remixable Worlds Tutorial Challenge” world (link here)
Challenge Steps:
- Remixable Worlds Tutorial Challenge world Contents:
- SpawnPoint
- Target
- MeleeWeapon
- PickUpSFX
- SwingSFX
- EnvironmentGenerator
- AudioManager
- GameManager
- WorldLeaderboard
- The Melee Weapon
- Select the MeleeWeapon object in the Hierarchy and press the F key.
- In the Properties panel under Behavior notice Motion is set to Interactive and Interaction is set to Grabbable. This allows for the object to be held by the player.
- In the Properties panel under More notice Collision Events From is set to Objects Tagged and the Object Tag is set to Target. This allows the attached script to register collision events from objects with a Gameplay Tag of Target.
- Also under More notice Use HWXS Grab Anchor is toggled on and the HWXS Anchor Position is set to -0.35 on the Y. This allows creators to adjust the grab position of the object.
- Also under More notice Avatar Pose is set to Sword and Primary Action Icon is set to Swing Weapon. This informs the avatar to hold the object like a sword and to display the swing icon on the player screen when grabbed.
- Now expand the MeleeWeapon object in the Hierarchy to expose the Mesh child object. This object is just the visual of the weapon and can be swapped out with any melee weapon mesh you have.
- Now scroll to the bottom of the MeleeWeapons Properties panel. Under the MeleeWeapon script there are 5 properties.
- audioManager: This is an object that handles all audio in the world.
- pickUpSFX: This is the sound effect that plays when the object is picked up.
- swingSFX: This is the sound effect that plays when the swing button is pressed/tapped.
- Damage: This is the amount of damage that is applied to the target when a collision occurs.
- swingCooldownMS: This is the amount of time in milliseconds that must pass before the player can swing the object again.
- The Target
- Select the Target object in the Hierarchy and press the F key.
- Expand the Target object in the Hierarchy to expose the Mesh child object. This object is just the visual of the target and can be swapped out with any target mesh you have.
- Now scroll to the bottom of the Targets Properties panel. Under the Target script there are 6 properties.
- audioManager: This is an object that handles all audio in the world.
- hitSFX: This is the sound effect that plays when the object is hit.
- deathSFX: This is the sound effect that plays when the target dies.
- health: This is the starting health of the target.
- points: This is the amount of points the player receives for defeating a target.
- respawnTimeMS: This is the amount of time in milliseconds that must pass before the target will respawn.
- Add Variety
- Add a different melee weapon asset and swap the current melee weapon mesh with it.
- Add a different target asset and swap the current targets mesh with it.
- Scripts
- There are 4 scripts in this world: AudioManager, MeleeWeapon, Target, & GameManager. Each has comments throughout so you can better understand them.
- Publish as a Remixable World
- Click the Publish button on the top right of the screen.
- Fill in all of the required info.
- Make sure to set the Allow others to remix option to true.
- Press the Publish button and you're done.
Level Up:
- This challenge goes over the very basics of modularity with a few basic mechanics. Now that you know how to make them modular, it's time to flesh out the world.
- Use the Environment Generator to add an environment.
- See (link to the Environment Generator tutorial) for more information.
- Add a third modular mechanic to the world that complements the first two.
- Enemy Spawner, Player Stats UI, Power Up System.
Conclusion:
Now you know the basics of creating a remixable world. You can now create modular mechanics with swappable meshes and easy to adjust variables.
Need Help?
Related Links