if (timer = 98){
xd1 == xd1 * -1;
yd1 == yd1 * -1;
}
you mixed up == and =
This is better:
if (timer == 98) {
xd1 = xd1 * -1;
yd1 = yd1 * -1;
}
- The == is for comparison
- the = is for assigning a value
1 Like
Hey, and welcome to the forum, great to have you here!
1 Like