How to make a gravity gun that fires a laser beam to the physics object and can pick up + throw it?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By newgodot_user

How do I make a gravity gun that can do the following:

  • Fire a laser beam from the barrel of the gun to the object that is being fired at (it will not bend like in GMod; just a straight line)
  • Pick up a physics object and move it around
  • Use the mouse wheel to move the object forwards and backwards while holding it
  • When the fire button is released the object falls down
  • When the alt-fire button is pressed, an impulse is applied to the object to send it flying forward.

It functions very similarly to the demo shown in this link: https://youtu.be/hgBbFutwl5Q

but just without the visual laser

:bust_in_silhouette: Reply From: DriftWare.exe

I’d like to know this as well.