Hi,
In my project when player moves the mouse or the right joystick camera rotates but if the joystick or the mouse input is none for a while camera resets back to the original position. The trouble I am having is with the panning part I am unable to pan the camera back to its position. I am able to reset the camera but it just teleports back i dont want it. Can someone please help with the blueprint.
The camera is attached to the spring arm and for manual rotation the “use controller rotation” is set true then after a delay of x seconds “use controller rotation” is set to false and camera resets (through teleportation). Blueprint is pawn class.
I tried the timeline to do the required but its not working.
here is the blueprint for teh reset function using timeline.
“spring arm rotation” is the initial rotator value thats being set in the event begin play. The value will change but its teleporting to the new rotation value i need panning to the initial rotation value
I’m not sure if I’m understanding you correctly.
If “set relative rotation” could change it, that would mean, it can change while the timeline is happening.
“Cache” it before the timeline starts? Set a it to a variable, and use that variable for the lerp node instead?
So I created a temp variable and stored the value before the timeline starts but that doesn’t do anything except rolling the camera one cycle and then nothing. But i watched the values and values are changing to the original rotator values but camera is not doing anything except rolling one cycle. Also, the values that the temp variable is storing are the new rotation values after the spring arm inherited controller rotation and those values if matched with the original or desired values of the spring arm rotator then the angle of the camera does not match so desired result is not possible anyways with these values …my guess is controller rotation and the spring arm rotation before inheriting controller rotation need to be synced in someway so the math can be done. Help me out here please.
coming back to start, here what exactly is happening while you are doing timeline? as i see that, lerp’s A value is current Roll and B value is of Roll where you want camera to be (like roll and pitch), i hope you are saving the variable like before camera actually turns, set this variable so that we have roll and pitch where we want to go back… and i think you did right? so what exactly is not working? camera won’t rotate back or smoothness is not there or?
Hi so sorry and thank you but it worked the problem was caching of the variable before the timeline starts and spring arm was controlled by pawn controller so the values for that needed to be set and called rather than spring arm. Thanks for all the help