Problem with camera rotation
Reported by: Eldar Bertsel
September 15, 2023
THE PROBLEM
For this week while I was working on the player controller I ran into the issue with a player camera rotation being very slow and non responsive. No matter how high you sensitivity is the camera would move like if you would be taping an arrow key once a second. Tap, camera moves a little, then stops. Tap, camera moves a little, then stops. This affects both vertical and horizontal rotation.
THE SOLUTION
The solution to the problem was relatively easy although to find it I had to spend a lot of time debugging the code. The problem was with using FixedUpdate instead of a LateUpdate. FixedUpdate is executed at a specific rate defined in the editor; while LateUpdate is executed after all the Update functions have been called. Seems like because of that specific rate the camera would move with what looks like a delay because it is skipping frames. When in LateUpdate the camera rotation would change every frame but after all the other updates are done, so there would be no frames that it would skip.
Get Psyche
Psyche
Welcome to your next great souls-like adventure!
Status | In development |
Author | Sad Ogre Studios |
Genre | Role Playing, Adventure |
Tags | Atmospheric, Fantasy, Indie, mind-bending, psyche, Sci-fi, Singleplayer, Souls-like, Third Person |
More posts
- Problem: Harder Isn't Always More FunDec 14, 2023
- How to make the controller feel more responsiveDec 14, 2023
- ModelMayhem: A Programmer's TaleDec 08, 2023
- Problem: Face Your FearsDec 03, 2023
- Time to show our real main characterDec 01, 2023
- Problems: melee combat system is too boringNov 24, 2023
- Problem: Frames Win Games?Nov 17, 2023
- Problem with camera transitionNov 16, 2023
- Combo Attack systemNov 11, 2023
- Problems with code reusabilityNov 03, 2023
Leave a comment
Log in with itch.io to leave a comment.