toggle current view mode
Problem it solves
You want the player to switch between a top-down minimap view and the 3D first-person view whenever they press a button.
What this block does
Toggles the screen rendering between 2D flat tilemap mode and 3D raycasting mode.
The block
Block ID: rcRender_toggleViewMode
Returns
void — Nothing.
Example
controller.menu.onEvent(ControllerButtonEvent.Pressed, function () {
Render.toggleViewMode()
})Add the extension
Add github:The-Code-Zone/Raycasting-pxt-extension to your project, or open: Import Raycasting-pxt-extension.