example JS for handling avatar collisions