Add camera lookahead when falling

scene_man
En Yi 2023-10-08 12:34:35 +08:00
parent ae730ce029
commit 0a4c700bf6
1 changed files with 1 additions and 0 deletions

View File

@ -1821,6 +1821,7 @@ void camera_update_system(Scene_t* scene)
if (p_ctransform->position.y >= data->camera.base_y)
{
data->camera.target_pos.y = p_ctransform->position.y;
data->camera.target_pos.y += p_ctransform->velocity.y * 0.2;
}
}
data->camera.target_pos.x = Clamp(data->camera.target_pos.x, data->game_rec.width / 2,