What Wick Editor Version are you using?
1.19.3
Describe the Problem
yeah, the title. i was trying to make a bloons td clone, but i cannot figure out how to make a thing face another thing
What have you tried so far?
i have attempted too much to document
Do you have a Wick Editor File that we can see?
yes, but new users can’t upload attachments, so i’ll just put the code.
var shootyTimer = 0;
var monkeyType = 1;
var tempDirForFacing
onEvent(‘update’, function () {
if(monkeyType == 1) {
if(shootyTimer === 0) {
shootyTimer = 1;
tempDirForFacing = bloonDefault.x - this.x / bloonDefault.y - this.y;
this.rotation = tempDirForFacing;
if(this.y < bloonDefault.y){this.rotation -= 180}
this.x += Math.sin(this.rotation) * 1;
this.y += Math.cos(this.rotation) * 1;
console.log(this.rotation + " " + tempDirForFacing);
shootyTimer --;
}
}
});