Rotating Camera without using Event Tick
In my 3rd person BP, I currently have it so that on a key press, the camera rotates around the character, using Delta Time as a value. Is there a way to implement the same functionality without the use of Event Tick, perhaps with Timer or Timeline? I've been trying those out, but can't seem to get it to rotate yet. My goal is to have the camera rotate on an event trigger until it hits a certain angle. Help would be much appreciated.
asked Feb 01 '17 at 08:09 AM in Using UE4
I like to use the Timeline if I simply want to rotate one lap (360) or continues laps.
I set it up with one Timeline with Float Track value 0 to 1. 0 will represent start and 1 represent 0. The time is how long you want it to take to get from start to finish of your animation, in this example it's 3 sec.
Then in my Blueprint I set up the float track output value (which increase from 0 - 1 in 3 sec) to the Lerp (same RimmyD above is taking about). The A value will be the value it will have when the Time is 0 in the Timeline and the B value will be the value it will have when the Time is 1 in the Timeline. In this example I interpolate between 0 and 360 which if hooked up to a SetRotationFunction will rotate the Target 360 eg one lap.
You can trigger the Timeline to Play from Start with any Event you want to. If you want to continue rotating lap after lap, in the Timeline, Enable Loop and it will go on and on.
answered Feb 02 '17 at 10:23 AM
You can use a Timer the same as tick but you have more control on how often it updates.
What you want to do is use a rInterp node. This takes in a current rotation, a target, how much time has passed (delta time) and the speed you want it to go. It outputs a new value equal to what your rotation would be in the delta time going the supplied speed.
There is an example of this in the Epic Blueprint learning content. The signs that turn to face you work this way.
answered Feb 01 '17 at 08:02 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here