I have the below blueprint, and I’m sure about the values that Current and Target variables are having, but my problem is that in the timeline, I noticed that the length of the timeline or the values of the keyframes are important, meaning that if I set them wrong, the First Camera will move somewhere else. I thought the whole point of the timeline was changing the speed of Lerp, but I didn’t know it could change the movements too. So I want the First Person to exactly end in the location of the Target, how can I do that?
For the Parent Socket of First Camera I have chosen the “FFP” socket. And I use the “RTS Parent Bone Space”, which means I want to get the relative location of the sockets.
How are you changing the TL speed - because that’s what you mean, right? We’re not supposed to touch the TL track points as that would affect sampling and interpolation results. Are you loading curves dynamically? Because that’s a thing, too.
Get Timeline → Set Play Rate is the way to go. The higher the number, the faster the timeline plays.
This is what I see as a result of my code when I lerp:
So why is the First Camera not ending with the view of the aim camera? Because I made it reach the location of the aimSocket using Lerp, I don’t understand why the views are different. I thought it was about the length of the timeline or something.
Can we double check the sockets then? Is the aim camera offset on the socket? Perhaps derive the transform from the aim camera rather than the socket.
One way or another, I wouldn’t look for an issue in the TL setup - you seem to have it done correctly. Debug the sockets to see where they really are while the TL plays.
Well, changing relative to the world isn’t going to let me observe how they are moving. Because the view goes under ground.
I moved the character a bit back, and then I noticed the debug spheres never move toward each other; they don’t have any movement.
Here is what I was able to do to see how the sockets move. I didn’t touch the Current and Target as they are the positions of the sockets, but I created two spheres and made the FFP the parent socket of the black-red sphere and the aimSocket the parent socket of the white sphere. Then I replaced the First Camera with the black-red Sphere ( which uses the FFP socket just like First Camera)
I see that you’re lerping transforms, how about you lerp location only (at least for now, to get to the bottom of this). Perhaps something is pivoting as the rotation is taking place?
Before using location for lerping, let me show you what it looks like when I set the rotation of the aimSocket to zero. (The rotation of FFP was already zero.)
Now that the rotations of sockets are zero, will it make any difference if I use vectors or locations for lerping?
Finally, I solved my problem. The problem was not about the timeline; it was about me not getting the transform of the sockets relative to the correct thing. I found a node named “Make Relative Transform,” and then I made the transform space of the “aimSocket” to “RTS World” (previously it was set to “RTS Parent Bone Space”) and plugged it to the first input of the “Make Relative Transform,” and I did the same thing to my “FFP” socket and plugged it to the second input of the “Make Relative Transform,” and then I finished setting the “Target” variable, and that was it!