Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collision area geometry does not get recalculated when Actor dimensions change #948

Closed
eonarheim opened this issue Apr 2, 2018 · 0 comments
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior

Comments

@eonarheim
Copy link
Member

Steps to Reproduce

Extend and actor and do not call the super constructor, try to collide this with another actor

See https://github.com/dgparker/excaliburjs-breakout for an example

Work around

class Paddle extends ex.Actor {
   public game: ex.Engine;
   constructor(game: ex.Engine) {
     super({
        x: game.drawWidth / 2,
        y: game.drawHeight - 40,
        width: 200,
        height: 20
     });
   //   this.game = game;
   //   this.setWidth(200);
   //   this.setHeight(20);
   //   this.x = this.game.drawWidth / 2;
   //   this.y = this.game.drawHeight - 40;
     this.color = ex.Color.Chartreuse;
 
     this.collisionType = ex.CollisionType.Fixed;
 
     this.addInputListener();
   }
  ..
}

Expected Result

Actors should collide and this method of setting properties should work.

Actual Result

No collision

@eonarheim eonarheim added the bug This issue describes undesirable, incorrect, or unexpected behavior label Apr 2, 2018
@eonarheim eonarheim added this to the 0.16.0 Release milestone Apr 2, 2018
@jedeen jedeen modified the milestones: 0.16.0 Release, 0.17.0 Release Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior
Projects
None yet
Development

No branches or pull requests

2 participants