Changeset View
Changeset View
Standalone View
Standalone View
doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
| Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | .. attribute:: linVelocityMax | ||||
| .. note:: | .. note:: | ||||
| A value of 0.0 disables this option (rather then setting it stationary). | A value of 0.0 disables this option (rather then setting it stationary). | ||||
| .. attribute:: localInertia | .. attribute:: localInertia | ||||
| the object's inertia vector in local coordinates. Read only. | the object's inertia vector in local coordinates. Read only. | ||||
| :type: list [ix, iy, iz] | :type: Vector((ix, iy, iz)) | ||||
| .. attribute:: parent | .. attribute:: parent | ||||
| The object's parent object. (read-only). | The object's parent object. (read-only). | ||||
| :type: :class:`KX_GameObject` or None | :type: :class:`KX_GameObject` or None | ||||
| .. attribute:: groupMembers | .. attribute:: groupMembers | ||||
| ▲ Show 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | .. method:: getLinearVelocity(local=False) | ||||
| This method returns the game object's velocity through it's centre of mass, ie no angular velocity component. | This method returns the game object's velocity through it's centre of mass, ie no angular velocity component. | ||||
| :arg local: | :arg local: | ||||
| * False: you get the "global" velocity ie: relative to world orientation. | * False: you get the "global" velocity ie: relative to world orientation. | ||||
| * True: you get the "local" velocity ie: relative to object orientation. | * True: you get the "local" velocity ie: relative to object orientation. | ||||
| :type local: boolean | :type local: boolean | ||||
| :return: the object's linear velocity. | :return: the object's linear velocity. | ||||
| :rtype: list [vx, vy, vz] | :rtype: Vector((vx, vy, vz)) | ||||
| .. method:: setLinearVelocity(velocity, local=False) | .. method:: setLinearVelocity(velocity, local=False) | ||||
| Sets the game object's linear velocity. | Sets the game object's linear velocity. | ||||
| This method sets game object's velocity through it's centre of mass, | This method sets game object's velocity through it's centre of mass, | ||||
| ie no angular velocity component. | ie no angular velocity component. | ||||
| Show All 10 Lines | .. method:: getAngularVelocity(local=False) | ||||
| Gets the game object's angular velocity. | Gets the game object's angular velocity. | ||||
| :arg local: | :arg local: | ||||
| * False: you get the "global" velocity ie: relative to world orientation. | * False: you get the "global" velocity ie: relative to world orientation. | ||||
| * True: you get the "local" velocity ie: relative to object orientation. | * True: you get the "local" velocity ie: relative to object orientation. | ||||
| :type local: boolean | :type local: boolean | ||||
| :return: the object's angular velocity. | :return: the object's angular velocity. | ||||
| :rtype: list [vx, vy, vz] | :rtype: Vector((vx, vy, vz)) | ||||
| .. method:: setAngularVelocity(velocity, local=False) | .. method:: setAngularVelocity(velocity, local=False) | ||||
| Sets the game object's angular velocity. | Sets the game object's angular velocity. | ||||
| This requires a dynamic object. | This requires a dynamic object. | ||||
| :arg velocity: angular velocity vector. | :arg velocity: angular velocity vector. | ||||
| :type velocity: boolean | :type velocity: boolean | ||||
| :arg local: | :arg local: | ||||
| * False: you get the "global" velocity ie: relative to world orientation. | * False: you get the "global" velocity ie: relative to world orientation. | ||||
| * True: you get the "local" velocity ie: relative to object orientation. | * True: you get the "local" velocity ie: relative to object orientation. | ||||
| .. method:: getVelocity(point=(0, 0, 0)) | .. method:: getVelocity(point=(0, 0, 0)) | ||||
| Gets the game object's velocity at the specified point. | Gets the game object's velocity at the specified point. | ||||
| Gets the game object's velocity at the specified point, including angular | Gets the game object's velocity at the specified point, including angular | ||||
| components. | components. | ||||
| :arg point: optional point to return the velocity for, in local coordinates. | :arg point: optional point to return the velocity for, in local coordinates. | ||||
| :type point: 3D Vector | :type point: 3D Vector | ||||
| :return: the velocity at the specified point. | :return: the velocity at the specified point. | ||||
| :rtype: list [vx, vy, vz] | :rtype: Vector((vx, vy, vz)) | ||||
| .. method:: getReactionForce() | .. method:: getReactionForce() | ||||
| Gets the game object's reaction force. | Gets the game object's reaction force. | ||||
| The reaction force is the force applied to this object over the last simulation timestep. | The reaction force is the force applied to this object over the last simulation timestep. | ||||
| This also includes impulses, eg from collisions. | This also includes impulses, eg from collisions. | ||||
| :return: the reaction force of this object. | :return: the reaction force of this object. | ||||
| :rtype: list [fx, fy, fz] | :rtype: Vector((fx, fy, fz)) | ||||
| .. note:: | .. note:: | ||||
| This is not implimented at the moment. | This is not implimented at the moment. | ||||
| .. method:: applyImpulse(point, impulse, local=False) | .. method:: applyImpulse(point, impulse, local=False) | ||||
| Applies an impulse to the game object. | Applies an impulse to the game object. | ||||
| ▲ Show 20 Lines • Show All 311 Lines • ▼ Show 20 Lines | .. class:: KX_GameObject(SCA_IObject) | ||||
| .. method:: addDebugProperty (name, debug = True) | .. method:: addDebugProperty (name, debug = True) | ||||
| Adds a single debug property to the debug list. | Adds a single debug property to the debug list. | ||||
| :arg name: name of the property that added to the debug list. | :arg name: name of the property that added to the debug list. | ||||
| :type name: string | :type name: string | ||||
| :arg debug: the debug state. | :arg debug: the debug state. | ||||
| :type debug: boolean | :type debug: boolean | ||||
| No newline at end of file | |||||