Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development How to Make a Video Game Player Input and Cameras Make a Follow Camera

hector alvarado
hector alvarado
15,796 Points

no FixedUpdate??

So we used the rotation update with the Quaternion on the OnFixedUpdate because the Frog its physical object and need to render at a different time right? so why we don't use the camera transform set as fixed update cos the camera is not a Rigidbody??

1 Answer

Cristian Villalobos
Cristian Villalobos
5,099 Points

If you use OnFixedUpdate on the camera, it will only follow the frog on specific frames and it may cause the illusion of "lagg" within the game. You can try it, sometimes it depends on how you have everything set-up, but most of the time I go for Update for the camera so it doesn't lagg behind. And as you said, OnFixedUpdate works best for physics.