From 34771ef40519529e14d4a06cc318b63554ebbe58 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Sun, 6 Apr 2008 20:02:41 +0000 Subject: add KX_GameObject::rayCastTo() PyDoc --- source/gameengine/PyDoc/KX_GameObject.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/gameengine/PyDoc') diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index 7ed4b59629c..31c9993e194 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -164,3 +164,20 @@ class KX_GameObject: @type other: L{KX_GameObject} or list [x, y, z] @rtype: float """ + def rayCastTo(other,dist,prop): + """ + Look towards another point/object and find first object hit within dist that matches prop. + + The ray is always casted from the center of the object, ignoring the object itself. + The ray is casted towards the center of another object or an explicit [x,y,z] point. + + @param other: [x,y,z] or object towards which the ray is casted + @type other: L{KX_GameObject} or string + @param dist: max distance to look (can be negative => look behind); 0 or omitted => detect up to other + @type dist: float + @param prop: property name that object must have; can be omitted => detect any object + @type prop: string + @rtype: L{KX_GameObject} + @return: the first object hit or None if no object or object does not match prop + """ + \ No newline at end of file -- cgit v1.2.3