mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update on_physics_update & update standard components
This commit is contained in:
parent
2d29b8c46c
commit
bf682daffe
9 changed files with 12 additions and 29 deletions
|
|
@ -151,9 +151,7 @@ function set_flight(flag) flight = flag end
|
|||
|
||||
local prev_angle = (vec2.angle({dir[3], dir[1]})) % 360
|
||||
|
||||
function on_physics_update(tps)
|
||||
local delta = (1.0 / tps)
|
||||
|
||||
function on_physics_update(delta)
|
||||
local grounded = body:is_grounded()
|
||||
body:set_vdamping(flight)
|
||||
body:set_gravity_scale({0, flight and 0.0 or props.gravity_scale, 0})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue