# Raycasting 3D render -- Blocks Edition

**URL:** https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921
**Category:** Game Design
**Tags:** graphics-and-math, extension, game
**Created:** [April 1, 2022, 6:23pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921 "2022-04-01T18:23:28Z")
**Posts on this page:** 1
**Showing post:** 206

<div class="post-metadata">

### Author: ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)
#### Post date: [March 6, 2023, 5:30pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/206 "2023-03-06T17:30:39Z")

</div>

In 3D world overlay condition is a little difference from 2D world. I modified some of your project.

- Jump condition.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/e174911d215b7826c9822e7fc025d2251b606f6b.png)  
Focus on Z direction, use overlaps in Z dimension block to filter touching in Z first.  
Then, filter falling state by sprite.ZVelocity\<0  
Then, optional, sprite.ZPosition\> otherSprite.ZPosition + [Height of otherSprite after scale] - AFewToleranceHeight
- Delay with Throttle block of Timer after hurt.  
Avoid pause in event function
- Animation setting.  
Raycasting provided animation setting is more efficient, though the animation of Character extension works, but it update by setImage(), which will trigger many update calculations repeatly we needn’t in our case .(image size, hitbox, overlay objects. etc.)

> **[JumpOn](https://arcade.makecode.com/S67185-78642-69237-94063)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

_[View the full topic](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921)._
