You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The body does not bounce, and can still rotate around the z axis. Am I missing something?
The whole class:
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)
}
}
BTW I am using the .esm version, I import excalibur as a native module from https://esm.sh/excalibur
The text was updated successfully, but these errors were encountered:
Discussed in #2365
Originally posted by KokoDoko June 26, 2022
I am building a excalibur game with realistic physics, in my game I enable physics with
This works, and I can add Actors with physics properties, except for these two:
The body does not bounce, and can still rotate around the z axis. Am I missing something?
The whole class:
BTW I am using the .esm version, I import excalibur as a native module from https://esm.sh/excalibur
The text was updated successfully, but these errors were encountered: