• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Stalling the camera

G

GM029

Guest
Say you have a secret area hidden behind a destructable wall and the camera is set to follow the player. Is there a way to stop the camera from moving past the boundary of the wall (so as not to give up the secret) then continue to follow when you enter the area?
 
J

Jaqueta

Guest
You could check if there's a collision for secrets in the direction that the camera object is going, if there is, the camera won't move any further.

But, depending on how your game looks or how it works, the player might notice the camera stalling, and will ruin the secret anyway.

I recommend doing something more "invisible" like New Super Mario Bros. did: http://themushroomkingdom.net/images/ss/nsmbu/032.jpg
You don't need to make masks or anything like that. A simple Foreground that disappears when the player is behind should be enough.
 
Last edited by a moderator:
Top