Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Weird holes in walls in raycaster?
- Treemaster134
-
Scratcher
7 posts
Weird holes in walls in raycaster?
So im making this little fps game using putneycats raycaster. But for some reason these weird holes appear in the walls sometimes, i cant really explain it. How do i fix this?
You can play the game here and see it for yourself:
https://scratch.mit.edu/projects/505858655/
You can play the game here and see it for yourself:
https://scratch.mit.edu/projects/505858655/
- awesome-llama
-
Scratcher
1000+ posts
Weird holes in walls in raycaster?
I had a bit of trouble getting the project to play, but looking in the code, I saw this in the ray sprite:

If the sprite is moving every 5 steps, it is possible for it to jump past the collision (map) sprite, so that spot will be treated as if no wall was there. It should fix with a smaller step size or the use of thicker walls in your map sprite.

If the sprite is moving every 5 steps, it is possible for it to jump past the collision (map) sprite, so that spot will be treated as if no wall was there. It should fix with a smaller step size or the use of thicker walls in your map sprite.
- Discussion Forums
- » Help with Scripts
-
» Weird holes in walls in raycaster?

