Fixed a crash in ~ResourceManager, implemented proper responses to collisions using sensors.