Offset of coordinates of the object when the timelines work in the blueprint

After setting the timeline to move the cabinet doors all works correctly, but as soon as I go into the box trigger one of the doors moves to an incomprehensible position. While the second works steadily, but after the end of the animation is not in the same position as it was originally. What could be the problem?


Hello Amirchik,

I’d be curious to see your Blueprint/Timeline too.

My first thought is that the animation is set up to ‘move in x direction at x speed for x seconds’ instead of ‘move from point a to point b based on this lerp value’

In my blueprint implemented a simple opening of the door, as well as opening the second door when the player hides there. The simple opening of the door is implemented in the blue comment, and the mechanics of hiding in yellow. The player can hide in the left door, and the right door simply opens. I hope you understand all of my crooked structure :smiley:

Also here’s the timeline

Thanks for that,

I think that ‘Set Relative Location’ node is the source of your problem.

The ‘update’ function on the timeline is being called every frame, and in the process of querying the Time → Value maybe a float is getting rounded. (Framerate could come into play here too)

Here’s a picture I took yesterday for this thread (I think you both have similar problems and the same solution)

The idea here is to move between 2 locations based on a 0-1 value. (And you could still use the curve in the timeline to get ease in/out while animating)

Let us know if you have any troubles with implementation.

I tried very hard to do this but it didn’t work :sweat_smile:, I don’t quite understand what a script using lerp should look like. Thank you in advance.

No worries,

The tricky part here would be to grab the location of the door in the world, and then use+modify that location to set the end point.

Now the door does not trigger, but when you enter the trigger it starts flashing and nothing happens. I’m thinking, maybe write all the mechanics again?

I see you have a ‘MultiGate’ that is both playing and reversing the timeline simultaneously. It might be better to use a ‘FlipFlop’ node to trigger each direction.