Camera moving back and forward

I want to make my camera move with the player and user will see a big picture but when appear some trigger camera should focus on that trigger. (For example player go on the street and when he approach to the shop camera will focus on this shop. )

P.S I made my camera following the player. I cant make only focusing.

Ok, so you need to code a camera manager script of some kind that by default makes the camera follow the player, but based on certain conditions also temporarily centers on other things?

Have you written some code yet? At which part of this task are you stuck?

yes. I made code which makes camera follows the player. But i want to make camera moving along axis Z and change camera visible zone(like approaching camera to one object and focusing on it) when some conditions are satisfied. With standard camera i cant do this. When i move standard camera along Z axis nothing changes. Exist some example of code or some tutorial about that or maybe you can help me?

So you want it to zoom in when you change z-value? If you use an orthographic camera it won’t zoom. You need to use a perspective camera OR modify your orthographic render script so that you can control the zoom.

I should change my render script with

vmath.matrix4_perspective

?

That would change to perspective rendering with all that it entails.

Thank you. All works fine.