So while making a game I was trying to get the distance between the player and an enemy so I did:
let ShipPos = this.actor.getPosition();
let EnemyPos = Sup.getActor("OtherShip").getPosition();
let distance = Sup.Math.Vector3.prototype.distanceTo(EnemyPos)
This all checks out fine I get the blue light to run the game but when I wanted to print out the distance in the debugger I used:
Sup.log(distance);
And it didn't work, it just prints out "NaN" I also tried putting the:
Sup.Math.Vector3.prototype.distanceTo(EnemyPos)
Into the log but I got the same result. Any thoughts?