An alternative camera logic which mimics the camera behavior of New Super Mario Bros / Super Mario Maker.
That means the camera is not staticly fixed to the player, instead the camera smoothly follows the player.
This script is about 90% compatible with customCamera.lua (zoom blocks and camera blockers are tested, using boundaries and custom screen sizes can cause problems) and with warpTransition.lua
While using warpTransition.lua you have to paste the following code line at line 464 because my script automatically makes inner section transitions, otherwise there would be conclifcts and bugs.
How to import in your level:
When you want to import the script into your whole episode place the script file in your episode folder, open your episode luna.lua and paste the following code line:
When you want to import the script into a specific level without influencing other levels in your episode place the script file into your level folder, open your level luna.lua (if there is none just create one) and paste also the same code lineas for using in your whole episode.
Settings
If you want to deactive the level start zooming feature or the whole script for a specific level or inside a function you can use one or both of the following code lines as an example (do not forget to import the script first in your script file):
Neat, although there is a better way to add comparability to warpTransitions without manual editing for the player. I’ll see if I can make an in depth explanation on it soon.
I hate to say this, but this is obsolete as this already exists.
And besides, why go yourself the hassle of making one thing when that thing is litteraly already done by another guy? i dont get it
Uh, customCamera works through multiple sizeables across your entire level, this is essentially plug-and-play as it requires no in-editor setup. Also, it's meant to work in unison with customCamera, though you may have not seen that
function onStart()
Graphics.setMainFramebufferSize(960,540)
end
function onCameraUpdate()
camera.width,camera.height = Graphics.getMainFramebufferSize()
end
function onStart()
Graphics.setMainFramebufferSize(960,540)
end
function onCameraUpdate()
camera.width,camera.height = Graphics.getMainFramebufferSize()
end
function onStart()
Graphics.setMainFramebufferSize(960,540)
end
function onCameraUpdate()
camera.width,camera.height = Graphics.getMainFramebufferSize()
end
this does not fix it for me. ill stick with my solution for now.