Added Z check in RectangleHitbox