Camera centers at the top of the player, not bottom
This commit is contained in:
parent
2c954c6d13
commit
e58e82b21b
4
camera.c
4
camera.c
@ -41,7 +41,9 @@ void camera_Advance(System_Camera *sys, Duration deltaTime) {
|
|||||||
if (sys->target.size.x > EPS)
|
if (sys->target.size.x > EPS)
|
||||||
tocenter = box2_Center(sys->target);
|
tocenter = box2_Center(sys->target);
|
||||||
else if (sys->player)
|
else if (sys->player)
|
||||||
tocenter = sys->player->super->position->position;
|
tocenter = vec2_Add(
|
||||||
|
sys->player->super->position->position,
|
||||||
|
vec2(0, -sys->player->super->hitbox->box.size.y));
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user