Hi,
I have a drawer that opens when the player interacts with it, I’ve setup a timeline as such and have tried using a float, vector track and here a select track which should just add or deduct the direction in the Y axis. For some reason the drawer will move a little further each time I open and close it
Each update iteration is adding to the relative location, so they are stacking the result in a running total rather than a set total. In other words, if we pretend that was a float track from 0 to 1, rather than setting the relative location to be within those bounds of 0 to 1, you are adding all the increments, so 0.1, 0.3, 0.5, 0.7 and so on, which will give you a higher value than the expected 1 in this example. If the timeline begin and end represents the final location the actor should use, then just use set relative location instead.
that makes sense, weirdly though when I use set relative location it just yeets the drawer out of existence, any suggestions?
Given that it is a drawer and only moves on 1 axis, you can just use a float track and move it along that intended axis. Since it is relative location, you can start the begin at 0 (or whatever value you may have predefined), and find a good value for the end. Start with something smaller like 5 and see what you like. You can also get the value you want by looking at the viewport of the actor and dragging the drawer out to see the relative location value you like.
instead of adding to the location do a vector lerp from the closed coordinates to the open coordinates. It should always start and end at the place you need.
Pass in a float from the timeline going from 0 → 1 and hook it up to the vlerp alpha.
I would also use set relative location for the draw position.
yes that did the trick, thankyou. I found out that the drawer launching itself was cause I was getting the world location at the start works perfectly now
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.