kidscancode / godot_recipes

Lessons, tutorials, and guides for game development using the Godot game engine.
MIT License
235 stars 38 forks source link

[Discussion] 3D Kinematic Car: Chase camera #43

Open cbscribe opened 3 years ago

cbscribe commented 3 years ago

Discussion for http://godotrecipes.com/3d/kinematic_car/car_camera/

kapeeteeleest-peeg commented 2 years ago

Can't get it to work at the final step... "Add a ChaseCamera instance to your main scene and set it Current?. Then connect the car’s change_camera signal to the camera’s _on_change_camera() function."

theMiszcz commented 2 years ago

"Add a ChaseCamera instance to your main scene and set it Current"

Save Scene ChaseCamera as a file inside your res:// folder and next put it (drag and drop from file system) inside Your_Scene or TestWorld Next select ChaseCamera on your node list and inside inspector (right panel) toggle Current field under Camera properties.

"Then connect the car’s change_camera signal to the camera’s _on_change_camera() function."

Select your Car from Node list, on your right panel next to Inspector is an Node tab, select it and from the list of available nodes, double-click change_camera and navigate to _on_change_camera() inside ChaseCamera.

Done.