Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

117
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda