Is there a way to translate a 2d platform world to the hero, and rotate the entire world around the hero as center axis (at any given time at the press of a button)?
<wontGetMeLaid>
i basically want to translate the entire world and its contents so that the character is at the origin, rotate it by 180 degrees, then translate it back to its original position. so that's:
1. Translate world by -player.x, -player.y
2. Rotate world by 180 degrees
3. Translate world by player.x, player.y
so, in opengl in c i would do...
glTranslate3f(player.x, player.y, 0.0);
glRotate3f(0, 1, 0, 180);
glTranslate3f(-player.x, player.y, 0.0);
draw_world();
</wontGetMeLaid>
just curious as to how this might work with as3 and box2d. any help/suggestions/references are super welcomed.
<wontGetMeLaid>
i basically want to translate the entire world and its contents so that the character is at the origin, rotate it by 180 degrees, then translate it back to its original position. so that's:
1. Translate world by -player.x, -player.y
2. Rotate world by 180 degrees
3. Translate world by player.x, player.y
so, in opengl in c i would do...
glTranslate3f(player.x, player.y, 0.0);
glRotate3f(0, 1, 0, 180);
glTranslate3f(-player.x, player.y, 0.0);
draw_world();
</wontGetMeLaid>
just curious as to how this might work with as3 and box2d. any help/suggestions/references are super welcomed.