Fix initial position
This commit is contained in:
parent
bfe3776914
commit
06c71feaa8
1 changed files with 3 additions and 2 deletions
|
@ -13,7 +13,7 @@ struct Movement {
|
||||||
right(false),
|
right(false),
|
||||||
turn_l(false),
|
turn_l(false),
|
||||||
turn_r(false),
|
turn_r(false),
|
||||||
sight_angle(0.)
|
sight_angle(3.14159)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -79,8 +79,9 @@ void periodic_update() {
|
||||||
|
|
||||||
_movement.tick();
|
_movement.tick();
|
||||||
_position += _movement.movement();
|
_position += _movement.movement();
|
||||||
|
Point look_at = _position + _movement.sight();
|
||||||
|
|
||||||
_render->set_camera(_position, _position + _movement.sight());
|
_render->set_camera(_position, look_at);
|
||||||
|
|
||||||
_last_time = now;
|
_last_time = now;
|
||||||
glutPostRedisplay();
|
glutPostRedisplay();
|
||||||
|
|
Loading…
Reference in a new issue