Animator, Composer, Game Designer, Webmaster, Programmer, Dreamer.
Age 26, Male
Full-stack developer
BUPT
China
Joined on 7/12/11
Hacsev 2015-08-23 17:04:04
I have one that I tested and it's supposed to be pretty efficient:
function cameraFollowCharacter(event:Event){ root.scrollRect = new Rectangle(player.x - stage.stageWidth/2, player.y - stage.stageHeight/2, stage.stageWidth, stage.stageHeight); }
liuzirui1122 2015-08-23 17:04:04
Many thanks!! This is really useful.
Ghost-Kewell 2015-08-24 05:27:23
Suffered
Hacsev
I have one that I tested and it's supposed to be pretty efficient:
function cameraFollowCharacter(event:Event){
root.scrollRect = new Rectangle(player.x - stage.stageWidth/2, player.y - stage.stageHeight/2, stage.stageWidth, stage.stageHeight);
}
liuzirui1122
Many thanks!! This is really useful.