I have two problems about the movement and a problem about the collision detection(this is the code https://pastebin.com/k4QEnrtm) :
1- The button must be clicked two time to work, but I want that it works on a single click;
2- By "Down" button, the div teleports up before going down, and I don't know why;
3- The collision detection make always the text change from "true" to "false" and vice versa if the dives collide or not, and if the write is "true" the "Down" button must be disabled. The problem is that by clicks it works, but on mouse down it doesn't work.
Can you tell me how to solve these problems?