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.

get

Problem it solves

You need to know the player's current looking direction or field of view to create sniper scope zoom mechanics.

What this block does

Retrieves the current numerical value of a render attribute like dirX, dirY, fov, or wallZScale.

The block

Block ID: rcRender_getAttribute

get %attribute block

Parameters

NameTypeDefaultMeaning
attrattributeThe renderer attribute to read (dirX, dirY, fov, or wallZScale).

Returns

number — The numerical value of the requested render attribute.

Example

let currentFov = Render.getAttribute(Render.attribute.fov)

Add the extension

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