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

97
Views
¿La física de Excalibur JS solo funciona parcialmente?

Estoy construyendo un juego de plataformas básico usando la física de ExcaliburJS . Habilité la física en el juego principal y en mis elementos Actor . Todo esto funciona de acuerdo con el código de ejemplo, con la excepción de estas propiedades físicas:

 this.body.bounciness //and friction, mass, inertia this.body.limitDegreeOfFreedom.push(DegreeOfFreedom.Rotation)

El cuerpo no rebota y todavía puede girar alrededor del eje z. Toda la clase:

 export class Mario extends Actor { constructor(texture) { super({ width: texture.width, height: texture.height }) // collision box size is working this.graphics.use(texture.toSprite()) // enable physics this.body.useGravity = true // working this.body.collisionType = CollisionType.Active // working this.body.bounciness = 0.7 // not working this.body.limitDegreeOfFreedom.push(DegreeOfFreedom.Rotation) // not working // all the console logs are working console.log(this.body.mass) console.log(this.body.inertia) console.log(this.body.bounciness) console.log(this.body.friction) console.log(this.body) } }

En mi juego habilito la física con

 class Game { constructor(){ Physics.useRealisticPhysics() Physics.gravity = new Vector(0, 800) this.engine = new Engine() // ... } }

¿Cómo puedo agregar rebote y limitar la rotación en el eje z en ExcaliburJS?

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!