New answers tagged

1

In the following line: gravHeading = createVector(otherBodyPosition.sub(this.pos)).heading(); otherBodyPosition.sub(this.pos) is already a Vector. When you try to createVector on that, you're putting a Vector in your Vector, and the .heading() method doesn't know how to resolve that, resulting in the value of gravHeading becoming NaN So when later in, you ...


Top 50 recent answers are included