1
0
Fork 0
Toy-Raytracer/Player.h
Teo-CD be78434a9c Player: Fix rotate
Rotation wasn't handled properly at all.
Properly bound between 0 and 360, and use
a proper modulo for floats.

Switch to float to have a more fluid rotation
between frames.
2024-01-21 20:31:51 +00:00

24 lines
339 B
C++

//
// Created by trotfunky on 27/05/19.
//
#ifndef RAYCASTING_PLAYER_H
#define RAYCASTING_PLAYER_H
class Player {
public:
Player(float x, float y, float alpha);
float x;
float y;
float orientation;
float fov = 70;
void move(float dx, float dy);
void rotate(float alpha);
};
#endif //RAYCASTING_PLAYER_H