refactored code to allow bear to collide with map layer in arcade physics