Added extra boundrary checking for collision.
Merge remote-tracking branch 'origin/gadget_11_leveleditor' into testing