MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Raycasting 3D Render

Transforms your 2D tilemaps and sprites into a first-person 3D/2.5D raycasted world with jumping, heights, camera controls, and multi-directional animations.

move with buttons velocity

Problem it solves

You want the player to walk forward/backward with Up/Down and rotate their 3D view with Left/Right, plus add realistic head-bobbing sway.

What this block does

Configures first-person player controls, setting movement speed, rotation turning speed, and camera walking sway.

The block

Block ID: rcRender_moveWithController

move with buttons velocity $v|| turn speed $va camera sway$cameraSway pixels block

Parameters

NameTypeDefaultMeaning
vnumber2Forward/backward walking speed (set to 0 to disable built-in controls).
vanumber3Turning rotational speed in radians per second (set to 0 to disable).
cameraSwaynumber0Amount of camera sway / head-bobbing in pixels while walking.

Returns

void — Nothing.

Example

Render.moveWithController(2, 3, 1)

Add the extension

Add github:The-Code-Zone/Raycasting-pxt-extension to your project, or open: Import Raycasting-pxt-extension.