Structures/CollisionData

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Is English even important anymore?)
Line 1: Line 1:
 
{{Structure
 
{{Structure
 
|Description=Passed as argument of {{HookFunction|ENTITY|PhysicsCollide}}.
 
|Description=Passed as argument of {{HookFunction|ENTITY|PhysicsCollide}}.
|Fields=
+
|Fields={{StructureField|Vector|HitPos|The collision position}}{{StructureField|Entity|HitEntity|The other collision entity}}{{StructureField|Vector|OurOldVelocity|The entity's velocity before the collision}}{{StructureField|PhysObj|HitObject|Other entity's physics object}}{{StructureField|number|DeltaTime|Time since the last collision}}{{StructureField|Vector|TheirOldVelocity|Speed of the other entity before the collision}}{{StructureField|number|Speed|The speed of the entity before the collision}}{{StructureField|Vector|HitNormal|Normal of the surface that hit the other entity}}{{StructureField|PhysObj|PhysObject|Entity's physics object}}
{{StructureField|Vector|HitPos|The collisions position}}
+
{{StructureField|Entity|HitEntity|The other collision entities}}
+
{{StructureField|Vector|OurOldVelocity|The entities velocity before the collision}}
+
{{StructureField|PhysObj|HitObject|The physics that collided with us}}
+
{{StructureField|number|DeltaTime|Time since the last collision}}
+
{{StructureField|Vector|TheirOldVelocity|Speed of the other entity before the collision}}
+
{{StructureField|number|Speed|The absolute speed of the entity before the collision}}
+
{{StructureField|Vector|HitNormal|Normal of the surface that hit the other entity}}
+
{{StructureField|PhysObj|PhysObject|Our physics object that collided the HitObject?}}
+
 
}}
 
}}

Revision as of 19:48, 19 January 2015

Passed as argument of ENTITY:PhysicsCollide.



Type Name Description
Vector HitPos

The collision position

Entity HitEntity

The other collision entity

Vector OurOldVelocity

The entity's velocity before the collision

PhysObj HitObject

Other entity's physics object

number DeltaTime

Time since the last collision

Vector TheirOldVelocity

Speed of the other entity before the collision

number Speed

The speed of the entity before the collision

Vector HitNormal

Normal of the surface that hit the other entity

PhysObj PhysObject

Entity's physics object

Personal tools
Navigation