Unity3D Physics Gun by Laumania - 2

Games & ProjectsPhysics

Unity3d sample implementation of a Half-life 2 / Garry's mod/ Gmod Physics Gun

Unknown VersionMIT LicenseUpdated 313 days agoCreated on February 16th, 2019
Go to source

Unity3d Physics Gun Sample

The goal of this sample is to show an implementation of the “Physics Gun” behavior from Half-Life 2 / Garry’s Mod / GMod.

Video about the creation of this repo, thoughts and reasons behind can be seen here.

alt text

Get started

“PhysicsGunInteractionBehavior.cs” is the script you are looking for. This is the script that does most of the actual logic, however, we encourage you to download the entire project and look at the “PhysicsGunSampleScene” as there are more to it than just the behavior.

Works with Unity v2020.2.2f1

Todo: “If somebody want to write a guide to get started, feel free to do a PR.”

Originally the “GravityGun” script in this repo, is based on this script: https://pastebin.com/w1G8m3dH


The point of creating this repo was to have a place where the Unity3d community could collaborate on this “Physics Gun”-script. So please optimize, add features, fix bugs and send a Pull-Request - I’ll be happy to look at it 😃

Show all projects by Laumania