update camera
Co-authored-by: Ivan Yuriev <ivanyr44@gmail.com>
This commit is contained in:
parent
a5ad1b9870
commit
75a4e031da
2
main.lua
2
main.lua
@ -22,7 +22,7 @@ function Camera:update(dt)
|
||||
|
||||
local mouse_offset = Vec3 { 0, 0, 0 }
|
||||
local offset_distance = 0
|
||||
local adjusted_target = self.target * (self.max_offset * offset_distance / self.max_offset_distance)
|
||||
local adjusted_target = self.target * (self.max_offset * offset_distance / self.max_offset_distance)
|
||||
|
||||
local to_target = adjusted_target - self.position
|
||||
self.position = self.position + to_target * (dt * self.lerp_speed)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user