How to smoothly reset camera position without use of "SetControlRotation"
Hi, this is something I have been struggling with for quite some time now. I'm creating a third person game where I would like to have the ability to freely move the camera around the player (ie GTA V) and then with a button press reset the camera to its starting position, blending with (ease) from point A to point B. I have achieved this by following this video tutorial: https://www.youtube.com/watch?v=AOTRu6CxzpE&t=2s
My issue is that this way of resetting the camera position ends in "SetControlRotation". So if I hit the assigned reset button while the player is moving left or right the camera will spin continuously until the player has stopped moving. I think this is because moving the player left or right also sets the control rotation, thus they are fighting one another. If I could smoothly reset the camera is some other fashion I could then "SetControlRotation" after the player has stopped. This was the camera could rest smoothly behind the back and the player could continue in its left or right direction, only updating the control direction once all movement had ended.
I've tried everything I can think of and I'm dead-ended on this. Please check out the video my BP is based on that and I will also make a capture. Sorry for the long winded question, I've asked about this elsewhere with not much result. Thanks for any help!
asked Dec 20 '18 at 09:04 AM in Blueprint Scripting
Alpha must go from 0 to 1, where 0 represents A and 1 represents B, so you can't use World Delta Seconds there. If you want to use Ease, you're going to need a Timeline with a Curve that goes from 0 to 1.
If you don't want to use a Timeline, try Rinterp instead of Ease. That runs on World Delta Seconds.
answered Dec 20 '18 at 09:32 AM
I've been struggling with this exact same issue for a few days as well, and I finally found the solution.
The key is to set OrientRotationToMovement variable (of the Character Movement component) to false just before the rotation, and then set it back to true when it's done. That's the only thing that worked for me, I hope it will help you too :)
answered May 12 '19 at 10:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here