Alternative method

hey! so i paused the video before codemonkey coded the rotation and i was wondering if there was any downside to handling camera movement in the way i did bc they both seem to work well… here is my code:

as you can see, i used “transform.Rotate” instead of “transform.eulerAngles += … etc”. are there any downsides or differences to this? also, is there a reason that codemonkey didn’t normalize the “moveVector”?
Thank you!

Using transform.Rotate() or transform.eulerAngles both effectively do the same thing, just from a different perspective. Neither method is wrong or right. There are many paths to the same goal.

Unlike character movement, it’s not critical to normalize the camera movement. The inputMoveDir values are already scaled between 0 and 1, so the longest the resulting vector can possibly be is 1.4f (when both directions are at 1). That doesn’t mean you can’t normalize the vector, however. One caveat: If you are using a game controller’s joystick to control the camera, you will remove any subtlety in the joystick by normalizing the vector. The slightest movement on the stick will automatically be one full unit of movement.

3 Likes

thank you! i appreciate it!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms