Setting Camera Target
-
Prerequisite
Description
Every camera has a target point that it looks at. This point is invisible, but you can change it by providing the x/y/z positions of a new target point.
Demo
In this program, we first add 3 boxes at x positions of -150, 0 and 150. then we add a new orbit camera. By default the camera would be looking at the origin point (x = 0).
When we change the camera’s target point to be x of -150, it is shifted left to look at the green box on the left. Similarly, when the target x is 150, the camera looks at the pink box on the right.
Try it yourself:
https://play.creaticode.com/projects/4b0759677c498e7a48f581c5
Learn More
-