Hi All,
Made a lerp to layout size that works great zooms to character on start of layout (except not on start of layout) just every tick and that works fine and then the player controls zoom. Except it effects the GUI. So changed it to layer scale (4 layers needed) and cant get it to work. Is their a way to exclude the GUI layers or whats wrong with the layer scale in a lerp. Seems to work some times but is instant want it to slowly zoom in on the "camera target" Thought the .01 would have the same effect as it does in the layout version.
Lets say:
Every tick lerp(layer(0),1.5,.01)
lerp(layer(1),1.5,.01)
lerp(layer(2),1.5,.01)
lerp(layer(3),1.5,.01)
Any ideas?
In properties on the GUI layer set "Scale rate=0" and "Parallax=0,0"
It is recommended to use dt with lerp, instead of the fixed value. This way it will work correctly with different framerates. For example:
lerp(first_value, second_value, dt*2)
Develop games in your browser. Powerful, performant & highly capable.
Yep, I forgot that global layer for GUI doesn't lock layer scale... seems as it does with parallax but anyways set both to 0,0 and working great now thanks. Also thank for the delta time point don't notice a difference but maybe down the line it will save resources.
you wont notice the difference, but people who play on high-end monitors with really fast refresh rates will see the game the way it is intended. Without dt, it would be unplayable - and you will get people saying your game is too buggy to play.