calibrate movement speed
This commit is contained in:
parent
c5f10b8395
commit
4313029bc7
@ -23,7 +23,7 @@ def_prop("ground_damping", 1.0)
|
|||||||
def_prop("movement_speed", 3.0)
|
def_prop("movement_speed", 3.0)
|
||||||
def_prop("run_speed_mul", 1.5)
|
def_prop("run_speed_mul", 1.5)
|
||||||
def_prop("crouch_speed_mul", 0.35)
|
def_prop("crouch_speed_mul", 0.35)
|
||||||
def_prop("flight_speed_mul", 4.0)
|
def_prop("flight_speed_mul", 2.0)
|
||||||
def_prop("gravity_scale", 1.0)
|
def_prop("gravity_scale", 1.0)
|
||||||
|
|
||||||
local function normalize_angle(angle)
|
local function normalize_angle(angle)
|
||||||
@ -100,8 +100,8 @@ function look_at(point, change_dir)
|
|||||||
if dot < 0.0 and not change_dir then
|
if dot < 0.0 and not change_dir then
|
||||||
viewdir = mat4.mul(tsf:get_rot(), {0, 0, -1})
|
viewdir = mat4.mul(tsf:get_rot(), {0, 0, -1})
|
||||||
else
|
else
|
||||||
dir[1] = dir[1] * 0.8 + viewdir[1] * 0.2
|
dir[1] = dir[1] * 0.8 + viewdir[1] * 0.13
|
||||||
dir[3] = dir[3] * 0.8 + viewdir[3] * 0.2
|
dir[3] = dir[3] * 0.8 + viewdir[3] * 0.13
|
||||||
end
|
end
|
||||||
|
|
||||||
if not headIndex then
|
if not headIndex then
|
||||||
|
|||||||
@ -2,7 +2,7 @@ local tsf = entity.transform
|
|||||||
local body = entity.rigidbody
|
local body = entity.rigidbody
|
||||||
local mob = entity:require_component("core:mob")
|
local mob = entity:require_component("core:mob")
|
||||||
|
|
||||||
local cheat_speed_mul = 5.0
|
local cheat_speed_mul = 10.0
|
||||||
|
|
||||||
local function process_player_inputs(pid, delta)
|
local function process_player_inputs(pid, delta)
|
||||||
if not hud or hud.is_inventory_open() or menu.page ~= "" then
|
if not hud or hud.is_inventory_open() or menu.page ~= "" then
|
||||||
@ -42,9 +42,9 @@ local function process_player_inputs(pid, delta)
|
|||||||
|
|
||||||
if mob.is_flight() then
|
if mob.is_flight() then
|
||||||
if isjump then
|
if isjump then
|
||||||
mob.move_vertical(speed * 4)
|
mob.move_vertical(speed * 3)
|
||||||
elseif iscrouch then
|
elseif iscrouch then
|
||||||
mob.move_vertical(-speed * 4)
|
mob.move_vertical(-speed * 3)
|
||||||
end
|
end
|
||||||
elseif body:is_grounded() and isjump then
|
elseif body:is_grounded() and isjump then
|
||||||
mob.jump()
|
mob.jump()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user