RInterpTo with UpdateBasedRotation
I'm using a custom gravitymod from pull 1773 with some of my own code thrown in. I've thrown this on top of the Shootergame example and currently I have a working 1st person shooter game with Custom gravity.
The problem I have, is that I can't get the UpdateBasedRotation camera updating clunkiness to stop. To clarify the problem: I have small planets I walk on, that update the player's gravity direction each tick. Walking to whichever direction updates the players basecomponent in my CharacterMovementComponent, which then calls the UpdateBasedRotation, which calls MyPlayerController::SetControlRotation. This keeps the character's view the same in relation to the planet as it was. However the update is quite large (a few degrees per each step on the small planets) which results in the view "jumping" those few degrees.
I modified the UpdateBasedRotation function to have a RInterpTo as such:
That should work, right? Well it doesn't. The camera still jumps. Maybe I'm missing the obvious here and modifying the wrong function? I thought I tracked the "jumpiness" here, but maybe it's somewhere else? Any ideas anyone?
asked Jan 16 '16 at 10:36 AM in C++ Programming
Would it maybe help to use a spring arm for your camera and use the lag settings to prevent popping?
answered Jan 16 '16 at 07:42 PM
Fixed by rcdarcey's suggestion:
Added a springarm component and enabled camera lag.
answered Jan 18 '16 at 03:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here