• gm_queryphys
    142 replies, posted
  • [release][highlight]gm_queryphys[/highlight] This module is a way of getting the vertexes of a physics object. [/release] [release][highlight]Functions[/highlight] [lua] -- Returns the number of convexs. PhysObj:GetConvexCount() -- Returns a table of triangles. PhysObj:GetConvexMesh(convexIndex) -- Rebuilds a PhysObj with the provided convexes. PhysObj:RebuildFromConvexs(position, angle, mass, damping, rotDamping, inertia, rotInertiaLimit, convexes) [/lua] [/release] [release][highlight]Download[/highlight] [img]http://www.sourcemm.net/media/images/code.gif[/img] Source Code SVN Repo: [url]http://gmod-haza.googlecode.com/svn/trunk/gm_queryphys/[/url] [img]http://www.sourcemm.net/media/images/win32.gif[/img] Windows Binary: [url]http://gmod-haza.googlecode.com/svn/trunk/gm_queryphys/Release/gm_queryphys.dll[/url] [/release]
  • Fucking awsome! now i can complete my bullet physics in source project! [sp]or probbably not...[/sp]
  • Will this get shipped with gmod? You posted about it in the gmod update threat.
  • Should work. [editline]03:35PM[/editline] I think as long as the object doesn't already have a physics object, you should be fine.
  • Hey, I tried to use the phys:GetConvexCount() but crashed with the reason "Lua Error Dump!". Here is my code... [CODE] local physmeta = FindMetaTable( "PhysObj" ) if physmeta and physmeta.GetConvexMesh and physmeta.GetConvexCount then local phys = ent:GetPhysicsObject() if IsValid( phys ) then local count = phys:GetConvexCount() print( count ) end end[/CODE]
  • Well I hit a roadblock. The triangle's vertices are not coming out in the correct order. Thus the collision model's planes all have incorrect normals. And there is nothing I can really do about it... Edit: Hurrr, Fixed. I'm a retard. [editline]03:04AM[/editline] Well I have a permanent weld tool working.
  • Me likey!:buddy: [editline]04:47PM[/editline] When Using :GetConvexMesh(0) on the head bone of humans (10) you get this error [code] attempt to index a nil value [/code]
  • I'm sorry, but my lack of knowlege (when it comes to modules) forces me to ask: where's the proper place to put these files?
  • place the .dll into garrysmod/garrysmod/lua/includes/modules/ Clientside is coming.
  • Say I throw this on my server. All clients reap the benefits while on it? e.g. this tool will work without each client having to get it: [url]http://www.garrysmod.org/downloads/?a=view&id=101535[/url]
  • 1. Thank you very much, I now know how to install the physics module as well. 2. Damn you norton! (It just deleted the file because it deamed unsafe.)
  • [QUOTE=Mooee;22709958]1. Thank you very much, I now know how to install the physics module as well. 2. Damn you norton! (It just deleted the file because it deamed unsafe.)[/QUOTE] I have Norten Internet Security 2010 and it doesn't say it's unsafe, it's an error in your Internet Security. ;)
  • Wow these people with norton. Its the most bloated, worst antivirus sofware ever. Use avast or nod32 or w/e
  • Norton? I stopped using that when it removed both shell32.dll and hal.dll becuse they was "unsafe"
  • A friend of mine had Norton and he switched anti virus when Norton told him explorer.exe was a virus :v:
  • [QUOTE=Ldesu;22724048]A friend of mine had Norton and he switched anti virus when Norton told him explorer.exe was a virus :v:[/QUOTE] Sounds like he was infected with a rootkit
  • [QUOTE=|King Flawless|;22735860]Sounds like he was infected with a rootkit[/QUOTE] No, it sounds like a virus replaced explorer with its own version. Norton can't detect rootkits for shit.
  • [QUOTE=aleksandervii;22734865]Where do i put the files? I mean all of them...[/QUOTE] You should only download one file, the windows binary (dll) and you should put it in lua/includes/modules
  • Lets not take this thread in the direction of antivirus wars, take it to this link instead. Also read it's OP, useful. [url]http://www.facepunch.com/showthread.php?t=948262[/url]