mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-05-21 07:13:19 -04:00
Increasing vertical collision box when determining if pathfinding goal is inside box, fixes pathfinding with dragons
This commit is contained in:
parent
f096939f27
commit
14961e3c6b
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ local function movement_generic_pathfind(self, method, pos2, speed)
|
|||
end
|
||||
else
|
||||
temp_goal = self._path[1]
|
||||
if self:pos_in_box(get_goal_pos(self, temp_goal)) then
|
||||
if self:pos_in_box(get_goal_pos(self, temp_goal), {math.max(self.width, 0.5), self.height}) then
|
||||
table.remove(self._path, 1)
|
||||
if #self._path > 0 then
|
||||
temp_goal = self._path[1]
|
||||
|
|
Loading…
Add table
Reference in a new issue