Skip to content

Commit

Permalink
basic camera movement
Browse files Browse the repository at this point in the history
  • Loading branch information
gandalf3 committed Dec 19, 2015
1 parent 868d1a0 commit d35cff0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions camera.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from bge import logic

scene = logic.getCurrentScene()
player = scene.objects["player"]

def main(controller):
own = controller.owner


own.worldPosition.x += (player.worldPosition.x - own.worldPosition.x) * .1
own.worldPosition.y += (player.worldPosition.y - own.worldPosition.y) * .1

0 comments on commit d35cff0

Please sign in to comment.