Vacuum on left mouse button

I already made systems like this.
One using “radial force” component with a negative value.
The radial force obviously is spherical and can affect objects that shouldn’t be (not in the front range of the weapon for example).

My solution was to have my objects ignore radial force by default, so I can choose when they can be attracted. The good moment is when they are in front of the weapon, so I’ve added an invisible cone attached to the canon and when an object gets in the cone, it stops ignoring force, and when it gets out of the cone, it ignores force again.

Then it is just about the input, the force of the component was 0 by default, so it doesn’t attract anything until I press left mouse for exemple, on press it sets the radial force to -50 000 or whatever negative value sits best.
This is a physical approach that I prefer because movements look more natural.

An other way is to use a line trace aligned to the canon. When an object is hit by the trace, it activates a timer inside of this object. On this timer, the object changes its position (on le line object/weapon, but close to the object).

I hope this is not too confused :slight_smile: