Objects (Placeables)
If you want to move something, it needs a "Placeable" script.
Static vs Physics
Static Placeable
Use the StaticPlaceable script for things that dont need physics. They just move exactly where your mouse goes. This is great for "ghost" previews or objects that stay stuck in place once you let go.
- Just add the
StaticPlaceablecomponent to your object. It will also add anInteractableObjectState.
Physics Placeable
Use the RigidbodyPlaceable script if you want your object to use Unity physics.
- Add the
RigidbodyPlaceablecomponent. It needs aRigidbodyand aCollidertoo (it will add them for you if they arent there).
Adding Info (Names and Descs)
Both types of objects use something called an Interactable Profile. This is where you can store info about the item.
- Right-click in your Project and go to
Create > DecoRat > Decorating > Interactable Profile. - Give it a Display Name and a Description. This is where you put the name of your object (like chair, house etc).
- Drag this profile into the Profile slot on the
Interactable Object Statecomponent on your object.
You can also toggle things like Can Hover or Can Place here if you want to lock certain items.