Levelhelper 2 Corona SDK Tutorial Part 4 & 5

After the release of part 3, I quickly did a further update to propose a solution to the camera offset problem I had. The solution was to restrict the camera with the game world. As the video was uploading to You Tube I released what a load of rubbish I was proposing. Whilst technically it would solve the problem – as long as the game remain horizontally fixed – it was not the proper solution. So at this point you might be wondering why I have left the video up there? Well, for a few reasons really. Firstly, there is still some useful information in there so although the solution is fairly ropey there are some other details that are entirely correct. Secondly, it’s good to learn by making mistakes and I;m just showing that process – haha, I know that’s weak.

So if I did it the wrong way, what is the right way? It’s at this point that I must implore Bogdan to name things a bit clearer. It’s in the documentation as:

setImportantAreaUnit

localĀ  setImportantAreaUnit(unit)

set important area

It’s not very clear but it this value seems to be an offset when the camera is following a node. By setting these values to 0 (seem to appear as .5 by default) the camera will focus directly on the center of the followed node.

Anyway the “incorrect” video is here but I will release a follow up that details the correct information.

Leave a Reply

Your email address will not be published. Required fields are marked *