Menu
I am using the p5.js and the matter.js libraries. The following code produces a [B]ReferenceError[B]Matter[B]line 4
[CODE]let width = 900;
let height = 600;
var Engine = Matter.Engine,
World = Matter.World,
Bodies = Matter.Bodies;
var engine = Engine.create();
var world = engine.world;
function setup(){
createCanvas(width,height);
car = new Car(100,height/2);
}
When the variables are declared within the setup function, everything worls fine, except I am not able to access the variables in my [B]car