ipodtouch0218 / NSMB-MarioVsLuigi

Standalone Unity remake of New Super Mario Bros DS' multiplayer gamemode, "Mario vs Luigi"
https://ipodtouch0218.itch.io/nsmb-mariovsluigi
678 stars 297 forks source link

ScrollCamera Camera Component Disables when Main Camera is Away From Edge of Level #178

Closed DonKaiStorm closed 1 year ago

DonKaiStorm commented 1 year ago

Like with the closed pull request I made earlier, this disables the rendering of the ScrollCamera when away from the edge of a level. Unlike my old version, however, it uses the location of the base camera and the min/max X values of the level to determine whether to turn on/off.

Another difference is that rather than every frame, the method gets invoked every 0.11 seconds (which is 9 times per second), helping decrease the performance cost.

Other than changes related to that, I added my name to the Github Contributors credit list, and fixed GradedWarrior's credit in the .txt file too.

ipodtouch0218 commented 1 year ago

One small thing that I'm going to revert myself is the 0.11s delay between Updates. It causes pop-in when you're spectating if you change from someone near the middle of the stage to one on the edges of the stage.

Other than that, good work. :)

DonKaiStorm commented 1 year ago

You are absolutely right on that change. I completely forgot to check if Spectator mode would have issues with it. Thanks for accepting my pull request.