diff options
Diffstat (limited to 'source/gameengine/PyDoc/GameTypes.py')
-rw-r--r-- | source/gameengine/PyDoc/GameTypes.py | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py index 35d8cd63c44..6a554a7c42e 100644 --- a/source/gameengine/PyDoc/GameTypes.py +++ b/source/gameengine/PyDoc/GameTypes.py @@ -2078,6 +2078,26 @@ class KX_GameObject(SCA_IObject): @param to: The name of the object to send the message to (optional) @type to: string """ + def reinstancePhysicsMesh(gameObject, meshObject): + """ + Updates the physics system with the changed mesh. + + If no arguments are given the physics mesh will be re-created from the first mesh assigned to the game object. + + @param gameObject: optional argument, set the physics shape from this gameObjets mesh. + @type gameObject: string, L{KX_GameObject} or None + @param meshObject: optional argument, set the physics shape from this mesh. + @type meshObject: string, L{KX_MeshProxy} or None + + @note: if this object has instances the other instances will be updated too. + @note: the gameObject argument has an advantage that it can convert from a mesh with modifiers applied (such as subsurf). + @warning: only triangle mesh type objects are supported currently (not convex hull) + @warning: if the object is a part of a combound object it will fail (parent or child) + @warning: rebuilding the physics mesh can be slow, running many times per second will give a performance hit. + @rtype: boolean + @return: True if reinstance succeeded, False if it failed. + """ + def get(key, default=None): """ Return the value matching key, or the default value if its not found. @@ -2387,18 +2407,6 @@ class KX_MeshProxy(SCA_IObject): @rtype: L{KX_PolyProxy} @return: a polygon object. """ - def reinstancePhysicsMesh(): - """ - Updates the physics system with the changed mesh. - - A mesh must have only one material with collision flags, - and have all collision primitives in one vertex array (ie. < 65535 verts) and - be either a polytope or polyheder mesh. If you don't get a warning in the - console when the collision type is polytope, the mesh is suitable for reinstance. - @bug: This currently does not work. - @rtype: boolean - @return: True if reinstance succeeded, False if it failed. - """ class SCA_MouseSensor(SCA_ISensor): """ |