The interactivity toolkit can be remixed to make games with unique interactions, moveable decorations, player poses and so much more. This kit is a great base for roleplaying games, immersive scenes, decorating games, and storytelling.
Remix this game to have a base to start your own Interactive game.
For more inspiration, check out this game to see a bigger world made using this toolkit.
In this toolkit, Build Mode and item placement is handled by the Item Placement Manager script located on the Build Mode Manager entity. This script controls item placement and you can change properties on this script to customize how item placement works in your game.
By default, build mode is toggled when you press B or the UI button on the screen, but this hot key can be changed on the Item Placement Manager script by changing the Build Mode Hotkey property. On this script, you can also change the highlight colors of placeable items, the tag names, the max ceiling height, and whether or not the aiming reticle is visible.
Before you start filling up your world with moveable and interactable items, you will want to properly set up your scene with walls and floors that you can place items on. In the example scene, you’ll find a small house with floors, walls, and a ceiling. Each of these building parts are tagged either floor, wall, or ceiling so moveable items can properly be placed on them. You can add your own floors by dragging in a new floor Voxel Object and adding the floor tag to it, or you can duplicate the floors that are already in the scene. The same can be done to add more walls or ceilings. Here is an in depth look at the different tags that you will want to use when setting up your scene:
The Item Placement Manager uses tags to determine where different types of items can be placed. These are the default tags that this script will look for when determining whether or not an item can be placed at a given location.
If you want to change these tag names, you can change them on the Item Placement Manager script.
Once you are happy with the layout of your scene and everything is properly tagged, you’re ready to start adding decorations to your scene.
Making an item you can move around is simple - just add the Moveable Item script!
Set the Item Type to determine how the item will behave when you move it.
Floor items can be placed on top of entities with the floor tag
Wall items can be placed flat against entities with the wall tag
Ceiling items will hang down from entities with the ceiling tag
Tabletop items can be placed on entities with the tabletop or floor tag
Rug items can be placed on entities with the floor tag and can intersect with floor items
Moveable items can be moved once the player has entered Build Mode. Once you have made a couple moveable items, it’s time to start making them interactable to add some depth to your world.
Making an item you can interact with is simple, there are a handful of scripts you can mix and match to set up most simple interactions.
For example, you could add the scripts Simple Interaction - Toggle Voxel Object and Simple Interaction - Toggle Play Sound to make a TV that you can turn on and off, or add the scripts Simple Interaction - Toggle Particles and Simple Interaction - Toggle Voxel Object to make a faucet that turns on and off.
The following scripts can be added to any entity to make simple interactions:
Simple Interaction - Toggle Voxel Object: Swaps between two voxel objects.
Simple Interaction - Toggle Play Sound: Turns a sound on an off. The entity needs a sound component for this to work.
Simple Interaction - Toggle Play Spatialized Sound: Turns a spatialized sound on and off. The entity needs a sound component and a dbb_spatialized_audio_hack script for this to work.
Simple Interaction - Toggle Particles: Turns a particle effect on or off. The entity needs a particle component for this to work.
Simple Interaction - Toggle Play Animation: Stops and starts the voxel object animation.
Simple Interactive - Toggle Transform Animation: Stops and starts a transform animation. Works in conjunction with the scripts dbb_sine, dbb_scale_wobble, dbb_rocking_motion, dbb_spin.
Simple Interaction - Toggle Skeletal Object: Swaps between the player avatar and a different skeletal object.
Simple Interaction - Play Spatialized Sound: Plays a spatialized sound once. The entity needs a sound component and a dbb_spatialized_audio_hack script for this to work.
Simple Interaction - Iterate Through Voxel Objects: Iterates through an array of voxel objects in order.
Simple Interaction - Iterate Through Skeletal Objects: Iterates through an array of skeletal objects on the player in order.
Add as many Furniture Interaction scripts to a single entity as you like - they can be combined to make interesting interactions. All of these scripts are used in the example scene - click on the different interactable decorations to see how they are used and how you can customize them yourself.
You can optionally make all of your movable objects snap to a grid rather than move freely.
The Build Mode UI button is displayed on screen via the **Build Mode Input **script on the Build Mode Manager entity. You can change the properties on this script to customize the build mode toggle button you see on screen. If you make your own UI buttons, you can display them by setting the Active Screen Template and Inactive Screen Template to your respective template refs.