forked from mtcontrib/maidroid
Merge pull request #102 from tacigar/tacigar/maidroid_size
Fix maidroid size and velocity
This commit is contained in:
commit
df08bf8e56
@ -192,7 +192,7 @@ function maidroid.maidroid.change_direction(self, destination)
|
|||||||
local position = self.object:getpos()
|
local position = self.object:getpos()
|
||||||
local direction = vector.subtract(destination, position)
|
local direction = vector.subtract(destination, position)
|
||||||
direction.y = 0
|
direction.y = 0
|
||||||
local velocity = vector.multiply(vector.normalize(direction), 3)
|
local velocity = vector.multiply(vector.normalize(direction), 1.5)
|
||||||
|
|
||||||
self.object:setvelocity(velocity)
|
self.object:setvelocity(velocity)
|
||||||
self:set_yaw_by_direction(direction)
|
self:set_yaw_by_direction(direction)
|
||||||
@ -205,7 +205,7 @@ function maidroid.maidroid.change_direction_randomly(self)
|
|||||||
y = 0,
|
y = 0,
|
||||||
z = math.random(0, 5) * 2 - 5,
|
z = math.random(0, 5) * 2 - 5,
|
||||||
}
|
}
|
||||||
local velocity = vector.multiply(vector.normalize(direction), 3)
|
local velocity = vector.multiply(vector.normalize(direction), 1.5)
|
||||||
self.object:setvelocity(velocity)
|
self.object:setvelocity(velocity)
|
||||||
self:set_yaw_by_direction(direction)
|
self:set_yaw_by_direction(direction)
|
||||||
end
|
end
|
||||||
@ -564,8 +564,8 @@ function maidroid.register_maidroid(product_name, def)
|
|||||||
|
|
||||||
physical = true,
|
physical = true,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x = 10, y = 10},
|
visual_size = {x = 7.5, y = 7.5},
|
||||||
collisionbox = {-0.25, -0.5, -0.25, 0.25, 1.05, 0.25},
|
collisionbox = {-0.25, -0.375, -0.25, 0.25, 0.75, 0.25},
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
infotext = "",
|
infotext = "",
|
||||||
|
Loading…
Reference in New Issue
Block a user