Created
July 6, 2013 10:33
-
-
Save antonmills/5939516 to your computer and use it in GitHub Desktop.
For scrolling a Box2D world. Remember, you've given Box2D a sprite to render to, all you need to do is offset that sprite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _canvas.style.position = "absolute"; | |
| _canvas.style.left = "" + -(_car.GetWorldCenter().x * worldScale) + "px"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment