iBenParry
(iBenParry)
March 30, 2016, 3:04pm
5
So, actor components work on a hierarchy system. If you place a static mesh component at 0, 0, 0, it will place the locator/transform/pivot (whatever you want to call it) of that static mesh at 0, 0, 0 within that actor which means the component is located in world space at the same location of the actor. A component that has a transform, not all do, can have at least two locations, a world location, and its location relative to the actor.
Using relative location allows you to change the position of a component relative to its actor. You need to know where you want your component to be relative to your actor. You are setting y to ?, but are setting x and z to 0 which means it will be exactly where it is shown.
Ok, lets do this the easy/hard way.
In your timeline create a vector track, that is the one with a V. You will have R, G, & B lines to set time and values on, they may be on top of each other because they are all set to 0. Go into your viewport and record the values x, y, & z values for where you want the drawer to be while closed. Go into your timeline and right click on one of the lines and add a key. For x, y, and z set the key time to 0 and the value to whatever the closed values were. Go back to the viewport and record the open values. Back in your timeline at the top click on the length and set it to .5. Right click on any line that is going to change. x or y depending on which way your desk is facing. Set the time value to point five and the position value to whatever you recorded. Now, put the output directly into new location in the set relative location.
Remove that make vector…and it should work.
That now makes the drawer work correctly. Since I’ve only been using Unreal for a few weeks, I had the track on the timeline set as float and not vector, so thanks for clearing that up. However, it still makes the drawer pop out instantly with no smooth transformation. I tried applying what I did for a locker door here, but doesn’t seem like it wants to work. Without the starting point inserted, the drawer moves out instantly, but with the starter point included, the drawer doesn’t want to move at all.