From f21032935b4460f0cae858c1ede35a5886d75e36 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Sun, 1 Jul 2018 19:48:00 -0500 Subject: [PATCH] dt with dt for arrow key look --- lib/objects/player.rb | 4 ++-- lib/objects/terrain.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/objects/player.rb b/lib/objects/player.rb index 1a729a9..788910a 100644 --- a/lib/objects/player.rb +++ b/lib/objects/player.rb @@ -118,10 +118,10 @@ class IMICFPS end if button_down?(Gosu::KbLeft) - @y_rotation+=relative_speed*100 + @y_rotation+=(relative_speed*1000)*delta_time end if button_down?(Gosu::KbRight) - @y_rotation-=relative_speed*100 + @y_rotation-=(relative_speed*1000)*delta_time end if @_time_in_air diff --git a/lib/objects/terrain.rb b/lib/objects/terrain.rb index a750e70..f5bb70b 100644 --- a/lib/objects/terrain.rb +++ b/lib/objects/terrain.rb @@ -18,6 +18,8 @@ class IMICFPS @nearest_vertex_lookup[x_slot][y_slot] = [] unless @nearest_vertex_lookup[x_slot][y_slot] @nearest_vertex_lookup[x_slot][y_slot] << vert end + + p model.faces.first end def height_at(vertex)