mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
add entity 'on_render' event
This commit is contained in:
parent
d099b294a2
commit
0d230f2449
5 changed files with 32 additions and 8 deletions
|
|
@ -88,7 +88,7 @@ function on_trigger_exit(index, oid)
|
|||
end
|
||||
end
|
||||
|
||||
function on_update()
|
||||
function on_render()
|
||||
if inair then
|
||||
local dt = time.delta();
|
||||
|
||||
|
|
@ -100,6 +100,9 @@ function on_update()
|
|||
mat4.scale(matrix, scale, matrix)
|
||||
rig:set_matrix(0, matrix)
|
||||
end
|
||||
end
|
||||
|
||||
function on_update()
|
||||
if target ~= -1 then
|
||||
local dir = vec3.sub({player.get_pos(target)}, tsf:get_pos())
|
||||
vec3.normalize(dir, dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue