diff --git a/src/game/puppycam2.c b/src/game/puppycam2.c index 065fb74f..6cc6ca59 100644 --- a/src/game/puppycam2.c +++ b/src/game/puppycam2.c @@ -1129,9 +1129,10 @@ void puppycam_projection_behaviours(void) //This is the base floor height when stood on the ground. It's used to set a baseline for where the camera sits while Mario remains a height from this point, so it keeps a consistent motion. gPuppyCam.targetFloorHeight = CLAMP(find_floor_height(gPuppyCam.targetObj->oPosX, gPuppyCam.targetObj->oPosY, gPuppyCam.targetObj->oPosZ), gPuppyCam.targetObj->oPosY-350, gPuppyCam.targetObj->oPosY+300); - - if (gMarioState->vel[1] <= 0.0f) - gPuppyCam.lastTargetFloorHeight = CLAMP(approach_f32_asymptotic(gPuppyCam.lastTargetFloorHeight,gPuppyCam.targetFloorHeight, 0.1f), gPuppyCam.targetObj->oPosY-350, gPuppyCam.targetObj->oPosY+300); + gPuppyCam.lastTargetFloorHeight = approach_f32_asymptotic(gPuppyCam.lastTargetFloorHeight + , gPuppyCam.targetFloorHeight + , CLAMP((absf(gMarioState->vel[1]) - 17.f) / 200.f, 0, 0.1f) + + CLAMP((absf(gPuppyCam.targetFloorHeight - gPuppyCam.lastTargetFloorHeight) - 30.f) / 300.f, 0, 0.1f)); if (gMarioState->action == ACT_SLEEPING || gMarioState->action == ACT_START_SLEEPING) gPuppyCam.zoom = approach_f32_asymptotic(gPuppyCam.zoom,gPuppyCam.zoomPoints[0],0.01f);