1
\$\begingroup\$

I have a car object in my game that has a car location like any other object. It is able to steer with bicycle KInematics and even rotates while it drives from a car heading vector. Now I need the camera to follow the car. I put the camera position 10 up and 10 behind the car. But I'm confused on where to make the camera look. I tried this:

pseudo code
lookatcamera = carLocation.x + 5 * cos(carHeading), carLocation.y, carLocation.z + 5 * sin(carHeading);
\$\endgroup\$
1
  • 2
    \$\begingroup\$ How did the results of that code differ from what you want? \$\endgroup\$
    – DMGregory
    Dec 21, 2020 at 5:12

0

You must log in to answer this question.

Browse other questions tagged .