Merge branch 'main' into animation

This commit is contained in:
MihailRis 2026-07-22 23:56:17 +03:00
commit 7c06a74244
67 changed files with 1231 additions and 260 deletions

View file

@ -139,14 +139,16 @@ function get_dir() return mob_dir end
function is_flight() return flight end
function set_flight(flag) flight = flag end
function set_flight(flag)
flight = flag
body:set_gravity_scale(flight and 0.0 or props.gravity_scale)
end
local prev_angle = (vec2.angle({mob_dir[3], mob_dir[1]})) % 360
function on_physics_update(delta)
local grounded = body:is_grounded()
body:set_vdamping(flight)
body:set_gravity_scale(flight and 0.0 or props.gravity_scale)
body:set_linear_damping(
(flight or not grounded) and props.air_damping or props.ground_damping
)