Open sverdin1 opened 1 year ago
It's unclear to me how this relates to matter.js.
Sorry, I can see how this is unclear.
I have created a body using matter.js - positioned at (initialX, initialY) - and I am trying to map its trajectory through the 1000 points of the for loop. I have not been able to do this without a value for acclerationDueToGravity.
What value should I plug in please?
Using p5.js library to display a dotted arc for the trajectory of an object.
I've putting random numbers in for accelerationDueToGravity, so I think I'm on the right track - but what value should accelerationDueToGravity be for the object to follow the arc perfectly?
vectorX = mouseX - initialX; vectorY = mouseY - initialY;
accelerationDueToGravity = ; timeStep = 0;
for(let i = 0; i < 1000; i++){ timeStep += 0.1;
}
Thanks.