Skip to content

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

License

Notifications You must be signed in to change notification settings

WarmedxMints/Unity3d-PhysicsGun

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity3d Physics Gun Sample

The goal of this sample is to be an implementation of a "Physics Gun", that mimics the exact behavior as the Physics Gun in Half-Life 2 / Garry's Mod.

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

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".

Todo: Write guide

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

Contribute

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 :)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 72.9%
  • ShaderLab 22.7%
  • HLSL 3.0%
  • GLSL 1.4%