You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Merge pull request #46 from aglab2/jittering-fix
Added puppycamera jittering fix
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user