I want to be able to make levels that are very different without having to recreate a new player character every time just so that I can change the camera. I’ve seen it suggested to make an object that follows the player and then have the camera in the object instead. Then I just have to create a new follow object every level.
I have not been able to get an object to follow my player though. This is what I’ve tried based on suggestions online but it is not working, the block (which will be something less noticeable later) doesn’t follow.
I appreciate that I have it working better now but do you know if there’s a way to make the following object more stable? It follows my Player and it makes the camera follow but if my Player stops the object zooms back and forth causing the screen to move back and forth (a little dizzying) http://www.flowlab.io/game/play/810388
I tested my own link and apparently the movement keys don’t work, they do when i’m working on it and testing it.
I did the following camera in my class and it’s working for almost everyone. One student though with his camera once he adds the Y direction it zooms all over the place. Did Y get done incorrectly, or is his level just too big? It doesn’t seem like that’s the issues since other students are using the same behaviors and have large levels and it works.
Hey @rmattison - there are two changes needed to make it work as expected:
There are two cameras that are fighting for control, remove the one in the Player (dog) object.
The Extract blocks inside the Camera object are extracting the x and y values from the wrong object. This is not your student’s fault - this is a bug stemming from the fact that there are two objects named “Object 7583”, and the camera is attempting to follow the incorrect one, which is a random ground block. To fix this, give the player object a meaningful name, e.g. “dog”, then update the extractors in the Camera.
I have another student whose camera is floating up instead of following him. I looked for the same errors the previous student was having problems with and it’s clearly something different that I haven’t been able to figure out.