How do you make an element change when it touches another element | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you make an element change when it touches another element

it can be a moving object like a moving button and when it touches another one it changes its properties like color

4th Jun 2020, 1:50 PM
moses
moses - avatar
2 Answers
+ 1
You can handle the (location) .. x,y By if & == ..... Because they will only touch when the first location approaches the second
4th Jun 2020, 1:56 PM
Abdulsalam Al-Ashwal
Abdulsalam Al-Ashwal - avatar