Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-08-27 07:34:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-08-27 07:34:53 +0400
commitd5667656353a6ce8247d1e1c125471688c679bd8 (patch)
tree2868244c59159d783d2e2ceb93162ed5af6d40b8 /source/gameengine/PyDoc
parent6778c8dc2914e5714f0211d0643c1ade34864d02 (diff)
get/set Angular velocity for KX_GameObjects python api and for the AddObject actuator.
Needed so objects created in an explosion could start spinning without having motion actuators and collision sensors on each item.
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r--source/gameengine/PyDoc/KX_GameObject.py20
-rw-r--r--source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py17
2 files changed, 37 insertions, 0 deletions
diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py
index a5ba5b1d634..033b2864351 100644
--- a/source/gameengine/PyDoc/KX_GameObject.py
+++ b/source/gameengine/PyDoc/KX_GameObject.py
@@ -135,6 +135,26 @@ class KX_GameObject:
@param local: - False: you get the "global" velocity ie: relative to world orientation (default).
- True: you get the "local" velocity ie: relative to object orientation.
"""
+ def getAngularVelocity(local = 0):
+ """
+ Gets the game object's angular velocity.
+
+ @type local: boolean
+ @param local: - False: you get the "global" velocity ie: relative to world orientation (default).
+ - True: you get the "local" velocity ie: relative to object orientation.
+ @rtype: list [vx, vy, vz]
+ @return: the object's angular velocity.
+ """
+ def setAngularVelocity(velocity, local = 0):
+ """
+ Sets the game object's angular velocity.
+
+ @type velocity: 3d vector.
+ @param velocity: angular velocity vector.
+ @type local: boolean
+ @param local: - False: you get the "global" velocity ie: relative to world orientation (default).
+ - True: you get the "local" velocity ie: relative to object orientation.
+ """
def getVelocity(point):
"""
Gets the game object's velocity at the specified point.
diff --git a/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py b/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
index 4f2bf85bff3..c3b2e947ddb 100644
--- a/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
+++ b/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
@@ -66,6 +66,23 @@ class KX_SCA_AddObjectActuator(SCA_IActuator):
@rtype: list [vx, vy, vz]
"""
+ def setAngularVelocity(vx, vy, vz):
+ """
+ Sets the initial angular velocity of added objects.
+
+ @type vx: float
+ @param vx: the x component of the initial angular velocity.
+ @type vy: float
+ @param vy: the y component of the initial angular velocity.
+ @type vz: float
+ @param vz: the z component of the initial angular velocity.
+ """
+ def getAngularVelocity():
+ """
+ Returns the initial angular velocity of added objects.
+
+ @rtype: list [vx, vy, vz]
+ """
def getLastCreatedObject():
"""
Returns the last object created by this actuator.