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.

set view angle by dirX and dirY

Problem it solves

You want your player camera to rotate toward a specific target coordinate vector.

What this block does

Sets the camera facing direction based on X and Y direction vector components.

The block

Block ID: rcRender_setViewAngle

set view angle by dirX%dirX and dirY%dirY block

Parameters

NameTypeDefaultMeaning
dirXnumberHorizontal direction vector component.
dirYnumberVertical direction vector component.

Returns

void — Nothing.

Example

Render.setViewAngle(0, -1)

Add the extension

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