Closed GoogleCodeExporter closed 9 years ago
I'm confused what exactly "origin shifting" means in this context...
Original comment by lel...@pickple.com
on 9 Feb 2012 at 2:03
Say your character starts at the origin (0,0) and your game world is very
large. As your character moves away from the origin, Box2d will be performing
calculations on larger and larger numbers because of the increasing distance
from box2d's origin. This may potentially be a problem at very large distances
(especially if the developer is trying to interpret and/or manipulate these
numbers). So origin shifting in this context would mean being able to set
Box2d's origin to any arbitrary point in your game world. For example when the
player reaches a certain distance from the origin, or perhaps when the player
reaches a particular area in the game world, Box2d's origin could be moved
somewhere closer to the player's current location so that physics calculations
are performed in a more localized context.
Original comment by Kalee...@gmail.com
on 9 Feb 2012 at 2:35
Implemented issue 260. You can now shift (re-center) a world using
b2World::ShiftOrigin. You can see this function in the testbed using CTRL +
arrow key.
Completed: At revision: 246
Original comment by erinca...@gmail.com
on 18 Mar 2012 at 7:01
Original issue reported on code.google.com by
Kalee...@gmail.com
on 9 Jan 2012 at 12:24