Structures/CollisionData

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Added description)
m (Removed a column)
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|CollisionData|HitPos|The collisions position}}
+
{{StructureField|Shared|Vector|HitPos|The collisions position}}
{{StructureField|Shared|Entity|CollisionData|HitEntity|The other collision entities}}
+
{{StructureField|Shared|Entity|HitEntity|The other collision entities}}
{{StructureField|Shared|Vector|CollisionData|OurOldVelocity|The entities velocity before the collision}}
+
{{StructureField|Shared|Vector|OurOldVelocity|The entities velocity before the collision}}
{{StructureField|Shared|PhysObj|CollisionData|HitObject|The physics that collided}}
+
{{StructureField|Shared|PhysObj|HitObject|The physics that collided}}
{{StructureField|Shared|number|CollisionData|DeltaTime|Time since the last collision}}
+
{{StructureField|Shared|number|DeltaTime|Time since the last collision}}
{{StructureField|Shared|Vector|CollisionData|TheirOldVelocity|Speed of the other entity before the collision}}
+
{{StructureField|Shared|Vector|TheirOldVelocity|Speed of the other entity before the collision}}
{{StructureField|Shared|number|CollisionData|Speed|The absolute speed of the entity before the collision}}
+
{{StructureField|Shared|number|Speed|The absolute speed of the entity before the collision}}
{{StructureField|Shared|Vector|CollisionData|HitNormal|Normal of the surface that hit the other entity}}
+
{{StructureField|Shared|Vector|HitNormal|Normal of the surface that hit the other entity}}
 
}}
 
}}

Revision as of 14:54, 3 August 2012

Passed as argument of the PhysicsCollide event.



Type Name Description
Shared Vector

HitPos

Default: The collisions position

Shared Entity

HitEntity

Default: The other collision entities

Shared Vector

OurOldVelocity

Default: The entities velocity before the collision

Shared PhysObj

HitObject

Default: The physics that collided

Shared number

DeltaTime

Default: Time since the last collision

Shared Vector

TheirOldVelocity

Default: Speed of the other entity before the collision

Shared number

Speed

Default: The absolute speed of the entity before the collision

Shared Vector

HitNormal

Default: Normal of the surface that hit the other entity

Personal tools
Navigation