Camera behind a moving object (tomb raider style)

Blitz3D Forums/Blitz3D Programming/Camera behind a moving object (tomb raider style)

Actually sswift, how about if the camera didn't have any collision set? Surely the camera would then go through the pillar, so nothing would ever get between the camera and the player providing you set a PickMode for it. It'd be a bit of a "sudden movement" though when the camera jumped in front of an obstacle. Either way, it's a nice idea but I can't help thinking it could be slow. Sampling four points would be worse still! Because it takes the samples multiple times per frame depending on how much there is between player and camera. Depends on your level complexity I suppose.

Perhaps there is a way to work out a non-blocked destination for the camera before moving it using a method something like this, and then work out a path to that destination that doesn't go through any objects, possibly with LinePick and/or EntityVisible. Then you just use linear interpolation to move the camera along that path a certain amount each frame. (Although the destination and therefore the path could change from frame to frame it'd still look ok since it wouldn't be moving the whole lot in one go).

Another good thing you can do I saw, I think in Neverwinter Nights or maybe Dungeon Siege or something, any objects that got between the camera and the player were set to alpha 0.5 so you could see the player through them without the camera having to move anywhere. Trouble is it only works on small, simply scenery objects such as trees, and not big complex ones like a whole level, for obvious reasons. Good for outdoors levels though.