1 decade ago by schme16
I've currently got my stage set so that the an entity gets drawn to a specific x,y coordinate, and the entire world repositions to frame it (like a camera); static images work great witht his, but now that I've switched my charecter to this method it disapears once it goes off what would have been the original stage boundaries, I assume this is to keep fps nice and smooth... but it means my charecter just blip dissapears.... any clues on how to override, change this?
Ahhh, nevermind; got a fix worked out now:
I just changed:
(animation.js)
to:
Ahhh, nevermind; got a fix worked out now:
I just changed:
(animation.js)
draw: function( targetX, targetY,) { var bbsize = Math.max(this.sheet.width, this.sheet.height); // On screen? if( targetX > ig.system.width || targetY > ig.system.height || targetX + bbsize < 0 || targetY + bbsize < 0 ) { return; }
to:
draw: function( targetX, targetY, alwaysDraw ) { var bbsize = Math.max(this.sheet.width, this.sheet.height); // On screen? if( (targetX > ig.system.width || targetY > ig.system.height || targetX + bbsize < 0 || targetY + bbsize < 0) && !alwaysDraw ) { return; }