Skip to content Skip to sidebar Skip to footer

(p5js/javascript) Got An Error Trying To Pass In 2 Objects Into A Function: Uncaught Typeerror: Object Is Undefined

I am trying to pass 2 objects into a function to see if they would collide, and destroy them both if they do. it was working before i added the collide function. tried it first by

Solution 1:

Got it...

  1. for loop variables are wrong (used i instead of k for inner for loop)
  2. dist function used incorrectly

Post a Comment for "(p5js/javascript) Got An Error Trying To Pass In 2 Objects Into A Function: Uncaught Typeerror: Object Is Undefined"