mirror of
https://github.com/tacigar/maidroid.git
synced 2025-01-10 16:20:19 +01:00
[UPDATE] Update maidroid collisionbox
This commit is contained in:
parent
e2bf995a74
commit
409001d7e3
@ -86,14 +86,14 @@ end
|
|||||||
-- maidroid.maidroid.get_front_node returns a node that exists in front of the maidroid.
|
-- maidroid.maidroid.get_front_node returns a node that exists in front of the maidroid.
|
||||||
function maidroid.maidroid.get_front_node(self)
|
function maidroid.maidroid.get_front_node(self)
|
||||||
local direction = self:get_look_direction()
|
local direction = self:get_look_direction()
|
||||||
|
print(direction.x, direction.z)
|
||||||
if direction.x >= 0.5 then
|
if math.abs(direction.x) >= 0.5 then
|
||||||
if direction.x > 0 then direction.x = 1 else direction.x = -1 end
|
if direction.x > 0 then direction.x = 1 else direction.x = -1 end
|
||||||
else
|
else
|
||||||
direction.x = 0
|
direction.x = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
if direction.z >= 0.5 then
|
if math.abs(direction.z) >= 0.5 then
|
||||||
if direction.z > 0 then direction.z = 1 else direction.z = -1 end
|
if direction.z > 0 then direction.z = 1 else direction.z = -1 end
|
||||||
else
|
else
|
||||||
direction.z = 0
|
direction.z = 0
|
||||||
@ -324,6 +324,7 @@ function maidroid.register_maidroid(product_name, def)
|
|||||||
physical = true,
|
physical = true,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x = 10, y = 10},
|
visual_size = {x = 10, y = 10},
|
||||||
|
collisionbox = {-0.25, -0.5, -0.25, 0.25, 1.05, 0.25},
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user