Structures/CollisionData

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Removed a column)
m (Removed state)
Line 2: Line 2:
 
| Description = Passed as argument of the [[SEnts/Events/PhysicsCollide|PhysicsCollide]] event.
 
| Description = Passed as argument of the [[SEnts/Events/PhysicsCollide|PhysicsCollide]] event.
 
| Fields =
 
| Fields =
{{StructureField|Shared|Vector|HitPos|The collisions position}}
+
{{StructureField|Vector|HitPos|The collisions position}}
{{StructureField|Shared|Entity|HitEntity|The other collision entities}}
+
{{StructureField|Entity|HitEntity|The other collision entities}}
{{StructureField|Shared|Vector|OurOldVelocity|The entities velocity before the collision}}
+
{{StructureField|Vector|OurOldVelocity|The entities velocity before the collision}}
{{StructureField|Shared|PhysObj|HitObject|The physics that collided}}
+
{{StructureField|PhysObj|HitObject|The physics that collided}}
{{StructureField|Shared|number|DeltaTime|Time since the last collision}}
+
{{StructureField|number|DeltaTime|Time since the last collision}}
{{StructureField|Shared|Vector|TheirOldVelocity|Speed of the other entity before the collision}}
+
{{StructureField|Vector|TheirOldVelocity|Speed of the other entity before the collision}}
{{StructureField|Shared|number|Speed|The absolute speed of the entity before the collision}}
+
{{StructureField|number|Speed|The absolute speed of the entity before the collision}}
{{StructureField|Shared|Vector|HitNormal|Normal of the surface that hit the other entity}}
+
{{StructureField|Vector|HitNormal|Normal of the surface that hit the other entity}}
 
}}
 
}}

Revision as of 22:47, 11 August 2012

Passed as argument of the PhysicsCollide event.



Type Name Description
Vector HitPos

The collisions position

Entity HitEntity

The other collision entities

Vector OurOldVelocity

The entities velocity before the collision

PhysObj HitObject

The physics that collided

number DeltaTime

Time since the last collision

Vector TheirOldVelocity

Speed of the other entity before the collision

number Speed

The absolute speed of the entity before the collision

Vector HitNormal

Normal of the surface that hit the other entity

Personal tools
Navigation