Download

Weird Object Sliding

So I have this setup where you can go up to an object, press E and if it implements my interface “Grabbable” I can manipulate the object with the Mouse X axis value.

This works pretty well honestly, but I have one issue; When I have an object grabbed and I stop moving my mouse the object “slides” back towards it’s original position.

You can see the issue in action here:

As you can see grabbing the item works fine. Moving it and letting go of it also works fine. But if I don’t move my mouse while having the object grabbed, it starts sliding back towards it’s original position.
I assume it’s because the Axis value I use doesn’t immediately go back to 0 after I stop moving my mouse but gradually.

Here is the setup for getting an object to grab on to:

The start location I get from the interface are just for Clamp values that you’ll see in the following picture, where I actually manipulate the object:
737e62274069ee06d0235d77b51069ffb223c7ef.jpeg

Does anyone have any idea on how to fix this?

Well, I never used this part of the engine, but from what you told, I think it might be considering the stop mouse movement=0 instead of just staying at the last updated value.

Yeah I got some help on the UE4 Discord. The solution ended up being a little bit more complicated than I thought but I have a video of it working now: