Camera problems

I need to implement a camera system in third person that is similar to chaseCamera and sets the position according to the character's attention focus.

In flagRushTutorial, when the front of the motorcycle is down-directed, for example, the camera doesn't set the position to show what's in front of the motorcycle.

The camera also needs to avoid colisions with the wall of a maze.

Where can I find suggestions or codes with these examples?

Well, chase camera would be the natural place to start, you can mess with the code and make it do what you want it to do… One thing you might want to check is the direction of your node's facing vector with


And perhaps give this argument as your direction in the camera.lookAt(...); method.

As for collision avoidance, it is a lot harder to do, and there are several ways to do it, but plenty of documents online regarding that... This is not dependent on the engine, so I suggest doing a Google search on that topic.