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

116
Views
Line in matter.js

I'm trying to create a triangular billiard table. My question is how do I make a line in matter.js? This way, I can make 3 intersecting lines to create a triangle. Here's some stuff I've already tried:

  • Creating a triangle with Bodies.polygon(x,y,3), but then I can't place a billiard ball inside, due to collision detection.
  • Ising thin rectangles to create a triangular boundary with Bodies.rectangle(x, y, 1, 200); (3 times), but then realized that if I want to create different triangles (i.e., obtuse, acute, right, isosceles, etc.), this would require too much manual tuning.
  • I tried using matter.vertices, but there's no examples of using it to create a line in the documentation! Closest thing I found was this GitHub issue, but I don't know what vertexSets is.

Any help is appreciated.

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!