-
Notifications
You must be signed in to change notification settings - Fork 0
Raycasting
sarahmss edited this page Jul 3, 2022
·
7 revisions
Raycasting is a rendering technique to create a 3D perspective in a 2D map.
- Map is a 2D square grid
- Either grid can be 0: no wall or 1: Wall
- For every pixel in screen, send out a ray that starts at the players's position and depend on both:
- Player's looking direction
- x-coordinate of the screen

- Player's height
- Player's field of vision (FOV)
- determines how wide the player sees the world in front of him/her.
- Player's position
- To put the player inside the world, we need to define the player's x and y coordinates.
- Projection plane's dimension
- Relationship between player and project plane