Hi. I need a little help using the InterpToMovement Component.
Is there any way to reverse it?
There are options for:
One Shot (A-B),
One Shot Reverse (A-B-A),
Loop Reset (A-B and then teleports back to A),
Ping Pong (A-B-A-B-A-B etc)
Ideally I’d like to be able to have one button make it go (A-B) and another button reverse it (B-A)
I’ve been playing around for a while but I’m not getting anywhere.
Any help is appreciated
Thanks
Hi SneakySteve83,
I don’t believe the InterpToMovement is the best thing to use for the functionality you are looking for. I would do something like this:
Here is the inside of that Timeline.
Let me know if the helps.
Cheers,
TJ
Hi. Thanks for the reply.
The reason I was hoping to use the InterpToMovement component was because it works with collisions.
There will be other objects that can stop the platform from moving along its path.
When I’ve used a timeline its ignored anything in its way.
I also like the InterpToMovement components ability to have multiple positions.
This may or may not work for you. But with the setup above, you can make the platform stop when it hits other objects by enabling the Sweep checkbox on the SetRelativeLocation node. The timeline will continue when the object stops, so you would need to setup an ‘if sweep is true’ then ‘stop the timeline’.
You can also adjust the positions by feeding new values into the VInterpTo node. Changing the timeline on the fly is a bit limited, but you can setup some rather complex movements through the float track ahead of time.
If you want to use the InterpToMovement component, I would need to do some more experimenting to see it’s capable of doing what you want.
Ok thanks. I’ll have a look tomorrow when I get some free time.
Thanks for your help
This page is top result in search engines for “Reverse InterpToMovement”, hence the necro-bump.
Solution:
Set behavior type to OneShot, then…
You can see here Initial Direction is -1.0 to reverse the completed InterpToMovement, followed by Restart and Activate.
Hey, I know it’s been a few months, but I stumbled across your solution to this problem. Your method works perfectly if the actor (in your case a door) has already fully completed its motion when you reverse and restart the movement, however I was wondering if you happened to find an option for interrupting movement partway through?
To use your door example, if you started opening a door, it opens halfway, then you interact again to close it while it’s still in motion towards “open.” With “Restart Movement”, this causes it to jump position to the end point rather than switching directions partway through.
In my case, I’m trying to create a moving platform that moves forwards while the player stands inside a trigger. Exiting the trigger should cause the platform to return to start from wherever it is and stay there. InterpTo Movement seems like a cheap and easy solution, but I just cannot figure out how to reverse the direction variable during play without popping… I’m in networked multiplayer, so I would prefer to use a movement component for the built-in networking smoothing. If you have any further thoughts on the topic I’d love to hear. Thank you for your time.