Stadia Name: Vilva#9953
Contributors: none
Package Name: Pushable Blocks
Package Description: Blocks that can be pushed around in a grid by the player. Includes Pressure Plates that recognize if a block or player stands on them. Also includes a reset button.
Share link: Crayta
Installation instructions
- Place the “PushableBlocksExample” template in your world.
Technical Explanation
Show explanation
- The blocks use raycasts to determine if the next space is empty. Therefore they can be blocked by walls or other entities. If you don’t want to use walls you can use the “PushableBlockStopper” template, which is an invisible mesh without player collision.
- PushableBlocks include a small “Ping Pong Ball” mesh for collision. This is a workaround, because triggers don’t react to Voxel Mesh collisions.
- “PressurePlatesManager” needs to have “PressurePlates” as direct children. Once they are all active it executes the action you specified via “_executeAction”. Currently included are “openDoor” and “moveMesh”.
- By default PressurePlates can be activated by any entity that is located on top. The “PressurePlateScript” includes checkboxes to change this: “Only Players”, or “Only Certain Entities” → Which defaults to the “PushableBlocks”.
- “PushableBlocksResetScript” needs to have a property reference on the “PushableBlocks” that it wants to reset.
Credits & special thanks
- “Simple Image” by AdamO
Questions, feedback or feature requests?
Please ask in Discord - Vilva#5980
Images/Video