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

109
Views
¿Cómo agregar efectivamente un colisionador no adjunto y verificar las intersecciones usando Rapier2D?

Actualmente estoy trabajando en un proyecto que utiliza enlaces JavaScript de Rapier. Estoy tratando de buscar intersecciones dentro de una forma específica. Parece que no puedo obtener una respuesta de la consulta que estoy usando.

 var collider = this.world.createCollider(new RAPIER.ColliderDesc(new RAPIER.Cuboid(10, 10))) collider.setActiveCollisionTypes(RAPIER.ActiveCollisionTypes.ALL) collider.setActiveEvents(RAPIER.ActiveEvents.INTERSECTION_EVENTS) collider.setSensor(true) collider.setTranslation({x: 100, y: 100}) collider.setCollisionGroups(0xffffffff) var shape = new RAPIER.Cuboid(10, 10); var shapePos = { x:105, y: 100 }; var shapeRot = 0.1; var groups = 0xffffffff; this.world.intersectionsWithShape(shapePos, shapeRot, shape, groups, (handle) => { console.log("The collider", handle, "intersects our shape."); return true; // Return `false` instead if we want to stop searching for other colliders that contain this point. });

Debería recibir un solo mensaje en la salida, diciendo que el colisionador se cruza con la forma, pero me estoy dando cuenta de eso. Sé que la ejecución avanza; ¿Qué estoy haciendo mal?

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!