JavaScript and JQuery: I have three problem about movement and collision detection.

andybullet

AndyBullet

Posted on December 1, 2019

JavaScript and JQuery: I have three problem about movement and collision detection.

Hi Guys!
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?

💖 💪 🙅 🚩
andybullet
AndyBullet

Posted on December 1, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related