This project is meant to replace Valve’s closed source physics system with bullet physics.
It was originally started by Jcw87 after Garry suggested a replacement in another thread.
The original thread
Player collision demonstration:
Lots of barrels:
**Things that have changed since the original:
**- Shadow controllers rotate props properly (that means the physgun is fixed)
- You can interact with props such as pushing them.
- Vehicles have been mostly implemented ([del]handling[/del] and airboats have not been implemented yet).
- Concave props work correctly.
- Some surface properties are implemented.
- Multithreading (partially works, only in collision detection not constraint solving)
- All constraints implemented (except for pulley constraint)
- New collision shapes (cylinders/cones/spheres)
- Too many things for me to remember.
**Things that still don’t work since the original:
**- Most physics event callbacks
Things we will be doing in the future:
- Exposing new interfaces and functionality.
Note: Although Garry moved this thread to the Gamemodes & Addons subforum, this is NOT a lua module.
Note: This thread isn't meant to talk about GTA IV or anything off topic. The old topic was constantly being derailed, which put me off from making this thread.
Q: How do I install this?
A: Pretty simple! Copy vphysics.dll into the engine bin directory (for GMod this is steamapps/common/GarrysMod/bin).
If you’re in the right directory, there will already be one there which is valve’s vphysics. You can either overwrite this or back it up (I recommend backing it up) and copy the new one in.
gmsv_vphysics_win32.dll is a GMod-specific Lua module that exposes new features to Lua developers. To install, copy this to GarrysMod/garrysmod/lua/bin.
Q: Can I use vphysics on games other than Garry’s Mod?
A: Absolutely! VPhysics should work on any source engine game, but be advised: it’s only tested on Garry’s Mod.
Q: Is there a chance I could be VAC banned for having VPhysics installed while I play on a multiplayer game?
A: No. VPhysics will not trigger VAC (I’ve accidentally connected to servers with VPhysics installed more than once, and I haven’t been VAC’d yet.)
Q: Do clients also have to have vphysics installed?
A: Nope! Source engine clients don’t predict the motion of physics objects or other physics entities.
The only thing predicted is the interactions between players and physics objects, but it’s too minor of a difference to justify requiring clients to install VPhysics.
However, depending on how things go, in the future this may become a requirement due to new features I may or may not add.
Q: How can I take advantage of newer VPhysics features?
A: In Garry’s Mod, I’ve bundled a Lua module with VPhysics (gmsv_vphysics_win32.dll). There isn’t any documentation however, instead you’ll have to look at the source code.
For other source mods, VPhysics has an updated interface which is included. You can see GMVPhy for examples of usage.