Implment getting horizontal/vertical intesections of ray casting.

This commit is contained in:
2023-04-04 20:02:49 +01:00
parent ca50b6f4b7
commit 3402fb50d9
5 changed files with 127 additions and 14 deletions
+2 -1
View File
@@ -4,6 +4,7 @@
#include "level.h"
#include "camera.h"
#include "maths.h"
static int handleKeyCode(sf::Keyboard::Key key);
@@ -11,7 +12,7 @@ static sf::Uint32 style = sf::Style::Titlebar;
static sf::RenderWindow window(sf::VideoMode(500, 500), "Raycasting", style);
static sf::Clock timer;
static Camera camera = { sf::Vector2f(300.f, 250.f), 0.f, 20, 360.f };
static Camera camera = { sf::Vector2f(300.f, 250.f), 0.f, 50, 2.0f*PI };
int view_init()
{