This article relates to the game "Dota 2". Click here for more information.
This article relates to the SDK/Workshop Tools for "Dota 2 Workshop Tools". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

PhysicsMesh

From Valve Developer Community
Jump to: navigation, search
English (en)Translate (Translate)

Meshes that represent the collision geometry of a model.

Display

  • To toggle physics mesh display, select Display > Collision Geo.

Create

Edit

  • Meshes are accessible via the outliner, and are found under the Physics Mesh List item.
  • Select a physics mesh item to edit in the Property Editor.

Data Structures

The vmdl physics mesh data looks like this:

CVphysicsMeshList m_physicsMeshList = CVphysicsMeshList
{
	CVphysicsMesh[] m_meshList = 
	[
		CVphysicsMesh
		{
			string m_meshName = "sdk_static_prop_physics"
			string m_meshFile = "models/sdk_static_prop/fbx/sdk_static_prop_physics.fbx"
			bool m_bUseExactGeometry = false
			bool m_bAutoMass = true
			float m_flMassOverride = 100.000000
			bool m_bOneConvexPiece = true
			bool m_bConcavePerJoint = false
			bool m_bSelfCollisions = false
			bool m_bForceKinematic = false
			bool m_bIgnoreScale = false
			bool m_bIgnoreSkeleton = false
		}
	]
}

m_physicsMeshList

A list of CVphysicsMesh elements.

Note.pngNote:A vmdl can have multiple physics meshes. Mesh groups and LOD groups will refer to these meshes by name.

CVphysicsMesh

The data description of a physics mesh.

Attribute Friendly Name Description Type Default Value
m_meshName Mesh Name The name of the mesh string
m_bUseExactGeometry Use Exact Geometry Do not convexify, instead use the exact geometry bool false
m_bAutoMass Auto Mass Calculate mass automatically bool true
m_flMassOverride Mass Override If automass is off, use this instead float 100.0
m_bOneConvexPiece One Convex Piece Convexify as one object, if off generate multiple convex hulls bool false
m_bConcavePerJoint Concave Per Joint Create hull per joint bool false
m_bSelfCollisions Self Collisions Collide with itself bool false
m_bForceKinematic Force Kinematic Force physics object to be kinematic bool false
m_bIgnoreScale Ignore Scale Ignore Scale bool false
m_bIgnoreSkeleton Ignore Skeleton Ignore Skeleton bool false
Note.pngNote:Force Kinematic, Ignore Scale, and Ignore Skeleton are possibly outdated and will not have a result on the compiled mesh