Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

322
Views
clicking on objects in matter.js

I want to make a something that lets me click on object, and then I click on a different object, then a constraint will appear between the the clicked squares, or, click an object and then somewhere else and a constraint will appear between where I clicked. I use an emtey array and add bodies into the array like this:

var r = 0;
var rectangles = [];
rectangles.push(new Bodies.rectangle(400, 400, 80, 80));
 Composite.add(engine.world, [rectangles[r]]);
r++;

I dont know if this makes a diffence with my plan, so I incuded it anyway. the first main problem i have is that I cant get the mouse to do anything when i click on an element.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!