Applying physics handle sends surrounding objects flying

Hi guys, I’ve managed to successfully get the physics gun working within my own game and I’ve noticed that if two objects are stacked on top of each other and then you grab the bottom one it will ‘push’ the object above it away. I’m just wondering if anyone would know how I could stop this initial push as it can cause the player to fly through the sky if they are standing on top of the stack as they apply a physics handle.

Thanks a lot.

Hi LukePGM,

You will need to get the location of the object that you are trying to pickup and factor that in. Take a look at the screenshots below to see how I did this. If you need to see more of my blueprint setup, please let me know and I’ll post it.

Make a variable that you can store the Other Item Location in and plug it into your pickup formula.

Get the other actor location off of the Line Trace and Hit Location, then set the variable.

I hope that helps,
TJ

Hi TJ,
I’ve followed your blueprint and have it set up in my game, but it still causes surrounding objects to be forced away when you apply the physics handle. It also appears to cause the grabbed object to be closer to the player if grabbed from a shorter distance away.

I also noticed that you have done something with mass in one of your pictures, i haven’t done that in my own blueprint and wondered if that may have anything to do with it?

Thanks again.

I am using my ‘physics gun’ more like a Skyrim-style physics item pickup. The only difference between what I have and, lets say the gravity gun from Half-life 2, is I limited the distance I can pickup objects and I don’t have a mechanic to shoot them.

All I am doing with the mass is making it so I can only pickup objects that are under a certain weight.

I will post my entire setup. It isn’t exactly what you are doing but it solved the item jumping issue I was having and maybe you can work a similar solution into your setup. If you still can’t get it working, post your entire BP setup and I’ll see if we can help figure it out.

Ok ive tried both of our blueprints out, and ive found that setting the hadle location to be at the centre of the grabbed object causes any objects touching the grabbed one to be moved away.

This is the case in both of our blueprints if i set it to do it in either of them.

i think that to stop objects from being pushed away is by changing how the objects interact with each other upon grabbing one of them somehow.

I’ll post my blueprint setup so you can take a look in a minute.

And the check trace and grab object functions:

Hi LukePGM,

The solution I provided above worked in my project, but have you found a solution that works for you yet?