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.ownerown.collisionCallbacks = [oncollision]localPointA
Section titled “localPointA”The contact point in the owner object space.
Type: mathutils.Vector
localPointB
Section titled “localPointB”The contact point in the collider object space.
Type: mathutils.Vector
worldPoint
Section titled “worldPoint”The contact point in world space.
Type: mathutils.Vector
normal
Section titled “normal”The contact normal in owner object space.
Type: mathutils.Vector
combinedFriction
Section titled “combinedFriction”The combined friction of the owner and collider object.
Type: float
combinedRollingFriction
Section titled “combinedRollingFriction”The combined rolling friction of the owner and collider object.
Type: float
combinedRestitution
Section titled “combinedRestitution”The combined restitution of the owner and collider object.
Type: float
appliedImpulse
Section titled “appliedImpulse”The applied impulse to the owner object.
Type: float
