chore: initialize the hitbox with the physics
This commit is contained in:
parent
9993221e0d
commit
f30fc6346d
3 changed files with 1 additions and 2 deletions
|
@ -43,7 +43,6 @@ local Hitbox = require("birb.modules.world.actors.utils.hitbox2D")
|
|||
function Actor2D:new(world, type, x, y, w, h, isSolid)
|
||||
self:init(world, type)
|
||||
self:initPhysics(x, y, 0, w, h, 0, isSolid)
|
||||
self:initHitboxes()
|
||||
self:initTimers()
|
||||
self:initSprite()
|
||||
self:initKeys()
|
||||
|
|
|
@ -45,7 +45,6 @@ local Boxes = require(cwd .. "utils.boxes")
|
|||
function Actor3D:new(world, type, x, y, z, w, h, d, isSolid)
|
||||
self:init(world, type)
|
||||
self:initPhysics(x, y, z, w, h, d, isSolid)
|
||||
self:initHitboxes()
|
||||
self:initTimers()
|
||||
self:initSprite()
|
||||
self.world:registerShape(self)
|
||||
|
|
|
@ -21,6 +21,7 @@ function PhysicalActor:initPhysics(x, y, z, w, h, d, isSolid)
|
|||
self.zfrc = 0
|
||||
|
||||
self:initGravity()
|
||||
self:initHitboxes()
|
||||
|
||||
self:setBounceFactor()
|
||||
self:setFilter()
|
||||
|
|
Loading…
Reference in a new issue