1 decade ago by Ash_Blue
For the newer run and jump demo I wanted to use the camera plugin at a larger Canvas scale. When trying to do this you'll quickly notice the camera jitters when camera.set(entity) is called. After fiddling with the plugin a bit I found a fix.
Dominic, any chance you can get this fix into the demo so others don't run into this? Haven't tested it in the run'n jump demo but it seems to fix all the bugs I was seeing at a smaller scale size.
Dominic, any chance you can get this fix into the demo so others don't run into this? Haven't tested it in the run'n jump demo but it seems to fix all the bugs I was seeing at a smaller scale size.
ig.Camera = ig.Class.extend({ set: function( entity ) { this.trap.pos.x = entity.pos.x - this.trap.size.x / 2; this.trap.pos.y = entity.pos.y + entity.size.y - this.trap.size.y; this.pos.x = this.trap.pos.x - (ig.system.height / 2 - this.trap.size.x / 2); this.pos.y = this.trap.pos.y - (ig.system.height / 2 - this.trap.size.y / 2); } });