Physics Grab Tool

So I wanna make a tool that lets you grab unanchored things with physics like a physics gun, but I don’t know how I would do that.

so the parts would float into your hand kinda thing?

yeah, that’s the gist of how it’d work.

i would recommend using the rocket propulsion body mover

it will move it to the desired place (your hand)
and can tell you when its reached it it does it pretty smoothly .

to add on to what S0MBRX said, cast a ray and on the intersection point create a part, if the ray intersected with an object, check if it is anchored and if so give it a rocketpropulsion object assigning its values appropriately.

I am very confused, i’m new to scripting lol

I wouldnt recommend trying to make something like this straight away then, but if youd really like to learn heres a tutorial on raycasting, a good start.

There’s already a great tutorial on this though I suggest checking that out first, plus scripts are provided as well if you want to see how it’ll work out, the concept of dragging things like a physics gun should be similar to this:

However, if you are new to scripting and don’t understand the terminology or services used to accomplish certain things in the script you can always refer back to a video tutorial like what @Vonetti suggested, the developer’s API reference, or ask a question here if needed.

2 Likes