About Camera Change & switch GamePlay

Sorry about bab english.
I want to do this: When i with an fps camera comes near a car and press a key. camera switch to camera s that attacked to car object and game play swith from fps to car control and so back. like gta or fps games with car. I am write car physic and fps control but cant whrite switch game play mod. I want help. thanks.

There are serval ways you can do this, one simple example is when you want to use a key input for example ‘e’ to enter the car, is using an object ‘tag’ for the car object ;


And using a raycast function;


In order to detect that tag/object, if the tag is detected by the raycast, then simply switch to the other camera.