Entity.PhysicsFromMesh

From GMod Wiki

Revision as of 15:08, 22 June 2011 by Colonel Thirty Two (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:PhysicsFromMesh( Table :Mesh Vertexes vertexes )
Description:
Makes the physics object for an entity from a table of triangles.
Returns: nil
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.PhysicsFromMesh]Entity.PhysicsFromMesh [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Table Structure

Garry posted a small description of how to use this function (link available in notes section), but it is quite vague. Here is the best available interperation. The table given is otherwise known as a 'Mesh'. A mesh table stores the triangular faces of the model in tabular structure. Each triangle is a table with the three vector positions defined in clockwise order.

Additional Notes

table -
1 -
pos - vector
2 -
pos - vector
3 -
pos - vector

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox