mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-07-18 20:36:41 -04:00
Improvements to steering
This commit is contained in:
parent
d539f9bea5
commit
5b4b5e7331
3 changed files with 43 additions and 10 deletions
|
@ -236,8 +236,8 @@ function mob:do_velocity()
|
|||
local vel = self.object:get_velocity()
|
||||
local yaw = self.object:get_yaw()
|
||||
if not yaw then return end
|
||||
local horz_vel = data.horz_vel or (data.gravity >= 0 and 0)
|
||||
local vert_vel = data.vert_vel or (data.gravity >= 0 and 0)
|
||||
local horz_vel = data.horz_vel --or (data.gravity >= 0 and 0)
|
||||
local vert_vel = data.vert_vel --or (data.gravity >= 0 and 0)
|
||||
vel.x = (horz_vel and (sin(yaw) * -horz_vel)) or vel.x
|
||||
vel.y = vert_vel or vel.y
|
||||
vel.z = (horz_vel and (cos(yaw) * horz_vel)) or vel.z
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue