Browse Source

Update orbit camera to avoid delta spikes (#57)

Artsiom Trubchyk 10 tháng trước cách đây
mục cha
commit
707682351b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      examples/render/orbit_camera/orbit_camera.script

+ 1 - 1
examples/render/orbit_camera/orbit_camera.script

@@ -40,7 +40,7 @@ function update(self, dt)
 end
 
 function on_input(self, action_id, action)
-	if action_id == hash("touch") then
+	if action_id == hash("touch") and not action.pressed then
 		self.yaw   = self.yaw   - action.dx * self.rotation_speed
 		self.pitch = self.pitch + action.dy * self.rotation_speed
 	elseif action_id == hash("wheel_up") then