Skip to content

KX_CollisionContactPoint

Base class: EXP_Value

A collision contact point passed to the collision callbacks.

import Range
def oncollision(object, point, normal, points):
print("Hit by", object)
for point in points:
print(point.localPointA)
print(point.localPointB)
print(point.worldPoint)
print(point.normal)
print(point.combinedFriction)
print(point.combinedRestitution)
print(point.appliedImpulse)
cont = Range.logic.getCurrentController()
own = cont.owner
own.collisionCallbacks = [oncollision]

The contact point in the owner object space.

Type: mathutils.Vector

The contact point in the collider object space.

Type: mathutils.Vector

The contact point in world space.

Type: mathutils.Vector

The contact normal in owner object space.

Type: mathutils.Vector

The combined friction of the owner and collider object.

Type: float

The combined rolling friction of the owner and collider object.

Type: float

The combined restitution of the owner and collider object.

Type: float

The applied impulse to the owner object.

Type: float