修复建筑碰撞问题

This commit is contained in:
aozhiwei 2019-04-22 11:47:45 +08:00
parent 79a8956b9a
commit 4e3f00bc68

View File

@ -73,12 +73,12 @@ ColliderComponent* Building::GetBoxBound()
collider->active = true; collider->active = true;
collider->owner = this; collider->owner = this;
collider->_min = Vector2D( collider->_min = Vector2D(
pos.x - meta->i->tilewidth()/2.0, -meta->i->tilewidth()/2.0,
pos.y - meta->i->tileheight()/2.0 -meta->i->tileheight()/2.0
); );
collider->_max = Vector2D( collider->_max = Vector2D(
pos.x + meta->i->tilewidth()/2.0, meta->i->tilewidth()/2.0,
pos.y + meta->i->tileheight()/2.0 meta->i->tileheight()/2.0
); );
return collider; return collider;
} }