Game Types (bge.types)
Introduction
This module contains the classes that appear as instances in the Game Engine. A script must interact with these classes if it is to affect the behaviour of objects in a game.
The following example would move an object (i.e. an instance of
KX_GameObject
) one unit up.
# bge.types.SCA_PythonController
cont = bge.logic.getCurrentController()
# bge.types.KX_GameObject
obj = cont.owner
obj.worldPosition.z += 1
To run the code, it could be placed in a Blender text block and executed with
a SCA_PythonController
logic brick.
Types
- BL_ArmatureBone(EXP_PyObjectPlus)
BL_ArmatureBone
BL_ArmatureBone.name
BL_ArmatureBone.connected
BL_ArmatureBone.hinge
BL_ArmatureBone.inherit_scale
BL_ArmatureBone.bbone_segments
BL_ArmatureBone.roll
BL_ArmatureBone.head
BL_ArmatureBone.tail
BL_ArmatureBone.length
BL_ArmatureBone.arm_head
BL_ArmatureBone.arm_tail
BL_ArmatureBone.arm_mat
BL_ArmatureBone.bone_mat
BL_ArmatureBone.parent
BL_ArmatureBone.children
- BL_ArmatureChannel(EXP_PyObjectPlus)
BL_ArmatureChannel
BL_ArmatureChannel.name
BL_ArmatureChannel.bone
BL_ArmatureChannel.parent
BL_ArmatureChannel.has_ik
BL_ArmatureChannel.ik_dof_x
BL_ArmatureChannel.ik_dof_y
BL_ArmatureChannel.ik_dof_z
BL_ArmatureChannel.ik_limit_x
BL_ArmatureChannel.ik_limit_y
BL_ArmatureChannel.ik_limit_z
BL_ArmatureChannel.ik_rot_control
BL_ArmatureChannel.ik_lin_control
BL_ArmatureChannel.location
BL_ArmatureChannel.scale
BL_ArmatureChannel.rotation_quaternion
BL_ArmatureChannel.rotation_euler
BL_ArmatureChannel.rotation_mode
BL_ArmatureChannel.channel_matrix
BL_ArmatureChannel.pose_matrix
BL_ArmatureChannel.pose_head
BL_ArmatureChannel.pose_tail
BL_ArmatureChannel.ik_min_x
BL_ArmatureChannel.ik_max_x
BL_ArmatureChannel.ik_min_y
BL_ArmatureChannel.ik_max_y
BL_ArmatureChannel.ik_min_z
BL_ArmatureChannel.ik_max_z
BL_ArmatureChannel.ik_stiffness_x
BL_ArmatureChannel.ik_stiffness_y
BL_ArmatureChannel.ik_stiffness_z
BL_ArmatureChannel.ik_stretch
BL_ArmatureChannel.ik_rot_weight
BL_ArmatureChannel.ik_lin_weight
BL_ArmatureChannel.joint_rotation
- BL_ArmatureConstraint(EXP_PyObjectPlus)
BL_ArmatureConstraint
BL_ArmatureConstraint.type
BL_ArmatureConstraint.name
BL_ArmatureConstraint.enforce
BL_ArmatureConstraint.headtail
BL_ArmatureConstraint.lin_error
BL_ArmatureConstraint.rot_error
BL_ArmatureConstraint.target
BL_ArmatureConstraint.subtarget
BL_ArmatureConstraint.active
BL_ArmatureConstraint.ik_weight
BL_ArmatureConstraint.ik_type
BL_ArmatureConstraint.ik_flag
BL_ArmatureConstraint.ik_dist
BL_ArmatureConstraint.ik_mode
- BL_ArmatureObject(KX_GameObject)
- BL_Shader(EXP_PyObjectPlus)
BL_Shader
BL_Shader.enabled
BL_Shader.objectCallbacks
BL_Shader.bindCallbacks
BL_Shader.setUniformfv()
BL_Shader.delSource()
BL_Shader.getFragmentProg()
BL_Shader.getVertexProg()
BL_Shader.isValid()
BL_Shader.setAttrib()
BL_Shader.setSampler()
BL_Shader.setSource()
BL_Shader.setSourceList()
BL_Shader.setUniform1f()
BL_Shader.setUniform1i()
BL_Shader.setUniform2f()
BL_Shader.setUniform2i()
BL_Shader.setUniform3f()
BL_Shader.setUniform3i()
BL_Shader.setUniform4f()
BL_Shader.setUniform4i()
BL_Shader.setUniformDef()
BL_Shader.setUniformMatrix3()
BL_Shader.setUniformMatrix4()
BL_Shader.setUniformiv()
BL_Shader.setUniformEyef()
BL_Shader.validate()
- BL_Texture(EXP_Value)
- EXP_ListValue(EXP_PropValue)
- EXP_PropValue(EXP_Value)
- EXP_PyObjectPlus
- EXP_Value(EXP_PyObjectPlus)
- KX_2DFilter(BL_Shader)
- KX_2DFilterOffScreen(EXP_Value)
- KX_2DFilterManager(EXP_PyObjectPlus)
- KX_BlenderMaterial(EXP_PyObjectPlus)
- KX_Camera(KX_GameObject)
KX_Camera
KX_Camera.INSIDE
KX_Camera.INTERSECT
KX_Camera.OUTSIDE
KX_Camera.lens
KX_Camera.lodDistanceFactor
KX_Camera.fov
KX_Camera.ortho_scale
KX_Camera.near
KX_Camera.far
KX_Camera.shift_x
KX_Camera.shift_y
KX_Camera.perspective
KX_Camera.projection_matrix
KX_Camera.modelview_matrix
KX_Camera.camera_to_world
KX_Camera.world_to_camera
KX_Camera.useViewport
KX_Camera.activityCulling
KX_Camera.sphereInsideFrustum()
KX_Camera.boxInsideFrustum()
KX_Camera.pointInsideFrustum()
KX_Camera.getCameraToWorld()
KX_Camera.getWorldToCamera()
KX_Camera.setOnTop()
KX_Camera.setViewport()
KX_Camera.getScreenPosition()
KX_Camera.getScreenVect()
KX_Camera.getScreenRay()
- KX_CharacterWrapper(EXP_PyObjectPlus)
KX_CharacterWrapper
KX_CharacterWrapper.onGround
KX_CharacterWrapper.gravity
KX_CharacterWrapper.fallSpeed
KX_CharacterWrapper.maxJumps
KX_CharacterWrapper.jumpCount
KX_CharacterWrapper.jumpSpeed
KX_CharacterWrapper.maxSlope
KX_CharacterWrapper.walkDirection
KX_CharacterWrapper.jump()
KX_CharacterWrapper.setVelocity()
KX_CharacterWrapper.reset()
- KX_CollisionContactPoint(EXP_Value)
KX_CollisionContactPoint
KX_CollisionContactPoint.localPointA
KX_CollisionContactPoint.localPointB
KX_CollisionContactPoint.worldPoint
KX_CollisionContactPoint.normal
KX_CollisionContactPoint.combinedFriction
KX_CollisionContactPoint.combinedRollingFriction
KX_CollisionContactPoint.combinedRestitution
KX_CollisionContactPoint.appliedImpulse
- KX_ConstraintWrapper(EXP_PyObjectPlus)
- KX_FontObject(KX_GameObject)
- KX_GameObject(SCA_IObject)
KX_GameObject
KX_GameObject.name
KX_GameObject.mass
KX_GameObject.friction
KX_GameObject.isSuspendDynamics
KX_GameObject.linearDamping
KX_GameObject.angularDamping
KX_GameObject.linVelocityMin
KX_GameObject.linVelocityMax
KX_GameObject.angularVelocityMin
KX_GameObject.angularVelocityMax
KX_GameObject.localInertia
KX_GameObject.parent
KX_GameObject.groupMembers
KX_GameObject.groupObject
KX_GameObject.collisionGroup
KX_GameObject.collisionMask
KX_GameObject.collisionCallbacks
KX_GameObject.scene
KX_GameObject.visible
KX_GameObject.layer
KX_GameObject.cullingBox
KX_GameObject.culled
KX_GameObject.color
KX_GameObject.physicsCulling
KX_GameObject.logicCulling
KX_GameObject.physicsCullingRadius
KX_GameObject.logicCullingRadius
KX_GameObject.occlusion
KX_GameObject.position
KX_GameObject.orientation
KX_GameObject.scaling
KX_GameObject.localOrientation
KX_GameObject.worldOrientation
KX_GameObject.localScale
KX_GameObject.worldScale
KX_GameObject.localPosition
KX_GameObject.worldPosition
KX_GameObject.localTransform
KX_GameObject.worldTransform
KX_GameObject.localLinearVelocity
KX_GameObject.worldLinearVelocity
KX_GameObject.localAngularVelocity
KX_GameObject.worldAngularVelocity
KX_GameObject.gravity
KX_GameObject.timeOffset
KX_GameObject.blenderObject
KX_GameObject.state
KX_GameObject.meshes
KX_GameObject.batchGroup
KX_GameObject.sensors
KX_GameObject.controllers
KX_GameObject.actuators
KX_GameObject.attrDict
KX_GameObject.components
KX_GameObject.children
KX_GameObject.childrenRecursive
KX_GameObject.life
KX_GameObject.debug
KX_GameObject.debugRecursive
KX_GameObject.currentLodLevel
KX_GameObject.lodManager
KX_GameObject.onRemove
KX_GameObject.logger
KX_GameObject.loggerName
KX_GameObject.endObject()
KX_GameObject.replaceMesh()
KX_GameObject.setVisible()
KX_GameObject.setOcclusion()
KX_GameObject.alignAxisToVect()
KX_GameObject.getAxisVect()
KX_GameObject.applyMovement()
KX_GameObject.applyRotation()
KX_GameObject.applyForce()
KX_GameObject.applyTorque()
KX_GameObject.getLinearVelocity()
KX_GameObject.setLinearVelocity()
KX_GameObject.getAngularVelocity()
KX_GameObject.setAngularVelocity()
KX_GameObject.getVelocity()
KX_GameObject.getReactionForce()
KX_GameObject.applyImpulse()
KX_GameObject.setDamping()
KX_GameObject.suspendPhysics()
KX_GameObject.restorePhysics()
KX_GameObject.suspendDynamics()
KX_GameObject.restoreDynamics()
KX_GameObject.enableRigidBody()
KX_GameObject.disableRigidBody()
KX_GameObject.setCcdMotionThreshold()
KX_GameObject.setCcdSweptSphereRadius()
KX_GameObject.setParent()
KX_GameObject.removeParent()
KX_GameObject.getPhysicsId()
KX_GameObject.getPropertyNames()
KX_GameObject.getDistanceTo()
KX_GameObject.getVectTo()
KX_GameObject.rayCastTo()
KX_GameObject.rayCast()
KX_GameObject.collide()
KX_GameObject.setCollisionMargin()
KX_GameObject.sendMessage()
KX_GameObject.reinstancePhysicsMesh()
KX_GameObject.replacePhysicsShape()
KX_GameObject.get()
KX_GameObject.playAction()
KX_GameObject.stopAction()
KX_GameObject.getActionFrame()
KX_GameObject.getActionName()
KX_GameObject.setActionFrame()
KX_GameObject.isPlayingAction()
KX_GameObject.addDebugProperty()
- KX_LibLoadStatus(EXP_PyObjectPlus)
- KX_LightObject(KX_GameObject)
- KX_LodLevel(EXP_PyObjectPlus)
- KX_LodManager(EXP_PyObjectPlus)
- KX_MeshProxy(EXP_Value)
KX_MeshProxy
KX_MeshProxy.materials
KX_MeshProxy.numPolygons
KX_MeshProxy.numMaterials
KX_MeshProxy.polygons
KX_MeshProxy.getMaterialName()
KX_MeshProxy.getTextureName()
KX_MeshProxy.getVertexArrayLength()
KX_MeshProxy.getVertex()
KX_MeshProxy.getPolygon()
KX_MeshProxy.transform()
KX_MeshProxy.transformUV()
KX_MeshProxy.replaceMaterial()
- KX_NavMeshObject(KX_GameObject)
- KX_PolyProxy(SCA_IObject)
KX_PolyProxy
KX_PolyProxy.material_name
KX_PolyProxy.material
KX_PolyProxy.texture_name
KX_PolyProxy.material_id
KX_PolyProxy.v1
KX_PolyProxy.v2
KX_PolyProxy.v3
KX_PolyProxy.v4
KX_PolyProxy.visible
KX_PolyProxy.collide
KX_PolyProxy.vertices
KX_PolyProxy.getMaterialName()
KX_PolyProxy.getMaterial()
KX_PolyProxy.getTextureName()
KX_PolyProxy.getMaterialIndex()
KX_PolyProxy.getNumVertex()
KX_PolyProxy.isVisible()
KX_PolyProxy.isCollider()
KX_PolyProxy.getVertexIndex()
KX_PolyProxy.getMesh()
- KX_PythonComponent(EXP_Value)
- KX_Scene(EXP_PyObjectPlus)
KX_Scene
KX_Scene.name
KX_Scene.objects
KX_Scene.objectsInactive
KX_Scene.lights
KX_Scene.cameras
KX_Scene.texts
KX_Scene.active_camera
KX_Scene.overrideCullingCamera
KX_Scene.world
KX_Scene.filterManager
KX_Scene.suspended
KX_Scene.activityCulling
KX_Scene.dbvt_culling
KX_Scene.pre_draw
KX_Scene.post_draw
KX_Scene.pre_draw_setup
KX_Scene.onRemove
KX_Scene.gravity
KX_Scene.logger
KX_Scene.loggerName
KX_Scene.addObject()
KX_Scene.end()
KX_Scene.restart()
KX_Scene.replace()
KX_Scene.suspend()
KX_Scene.resume()
KX_Scene.get()
KX_Scene.drawObstacleSimulation()
KX_Scene.convertBlenderObject()
KX_Scene.convertBlenderObjectsList()
KX_Scene.convertBlenderCollection()
KX_Scene.convertBlenderAction()
KX_Scene.unregisterBlenderAction()
KX_Scene.addOverlayCollection()
KX_Scene.removeOverlayCollection()
KX_Scene.getGameObjectFromObject()
- KX_VehicleWrapper(EXP_PyObjectPlus)
KX_VehicleWrapper
KX_VehicleWrapper.addWheel()
KX_VehicleWrapper.applyBraking()
KX_VehicleWrapper.applyEngineForce()
KX_VehicleWrapper.getConstraintId()
KX_VehicleWrapper.getConstraintType()
KX_VehicleWrapper.getNumWheels()
KX_VehicleWrapper.getWheelOrientationQuaternion()
KX_VehicleWrapper.getWheelPosition()
KX_VehicleWrapper.getWheelRotation()
KX_VehicleWrapper.setRollInfluence()
KX_VehicleWrapper.setSteeringValue()
KX_VehicleWrapper.setSuspensionCompression()
KX_VehicleWrapper.setSuspensionDamping()
KX_VehicleWrapper.setSuspensionStiffness()
KX_VehicleWrapper.setTyreFriction()
KX_VehicleWrapper.rayMask
- KX_VertexProxy(SCA_IObject)
KX_VertexProxy
KX_VertexProxy.XYZ
KX_VertexProxy.UV
KX_VertexProxy.uvs
KX_VertexProxy.normal
KX_VertexProxy.color
KX_VertexProxy.colors
KX_VertexProxy.x
KX_VertexProxy.y
KX_VertexProxy.z
KX_VertexProxy.u
KX_VertexProxy.v
KX_VertexProxy.u2
KX_VertexProxy.v2
KX_VertexProxy.r
KX_VertexProxy.g
KX_VertexProxy.b
KX_VertexProxy.a
KX_VertexProxy.getXYZ()
KX_VertexProxy.setXYZ()
KX_VertexProxy.getUV()
KX_VertexProxy.setUV()
KX_VertexProxy.getUV2()
KX_VertexProxy.setUV2()
KX_VertexProxy.getRGBA()
KX_VertexProxy.setRGBA()
KX_VertexProxy.getNormal()
KX_VertexProxy.setNormal()
- SCA_2DFilterActuator(SCA_IActuator)
- SCA_ANDController(SCA_IController)
- SCA_ActionActuator(SCA_IActuator)
- SCA_ActuatorSensor(SCA_ISensor)
- SCA_AddObjectActuator(SCA_IActuator)
- SCA_AlwaysSensor(SCA_ISensor)
- SCA_ArmatureActuator(SCA_IActuator)
- SCA_ArmatureSensor(SCA_ISensor)
- SCA_CameraActuator(SCA_IActuator)
- SCA_CollisionSensor(SCA_ISensor)
- SCA_ConstraintActuator(SCA_IActuator)
SCA_ConstraintActuator
SCA_ConstraintActuator.damp
SCA_ConstraintActuator.rotDamp
SCA_ConstraintActuator.direction
SCA_ConstraintActuator.option
SCA_ConstraintActuator.time
SCA_ConstraintActuator.propName
SCA_ConstraintActuator.min
SCA_ConstraintActuator.distance
SCA_ConstraintActuator.max
SCA_ConstraintActuator.rayLength
SCA_ConstraintActuator.limit
- SCA_DelaySensor(SCA_ISensor)
- SCA_DynamicActuator(SCA_IActuator)
- SCA_EndObjectActuator(SCA_IActuator)
- SCA_GameActuator(SCA_IActuator)
- SCA_IActuator(SCA_ILogicBrick)
- SCA_IController(SCA_ILogicBrick)
- SCA_ILogicBrick(EXP_Value)
- SCA_IObject(EXP_Value)
- SCA_ISensor(SCA_ILogicBrick)
- SCA_InputEvent(EXP_PyObjectPlus)
- SCA_JoystickSensor(SCA_ISensor)
SCA_JoystickSensor
SCA_JoystickSensor.axisValues
SCA_JoystickSensor.axisSingle
SCA_JoystickSensor.hatValues
SCA_JoystickSensor.hatSingle
SCA_JoystickSensor.numAxis
SCA_JoystickSensor.numButtons
SCA_JoystickSensor.numHats
SCA_JoystickSensor.connected
SCA_JoystickSensor.index
SCA_JoystickSensor.threshold
SCA_JoystickSensor.button
SCA_JoystickSensor.axis
SCA_JoystickSensor.hat
SCA_JoystickSensor.getButtonActiveList()
SCA_JoystickSensor.getButtonStatus()
- SCA_KeyboardSensor(SCA_ISensor)
- SCA_MouseActuator(SCA_IActuator)
SCA_MouseActuator
SCA_MouseActuator.reset()
SCA_MouseActuator.visible
SCA_MouseActuator.use_axis_x
SCA_MouseActuator.use_axis_y
SCA_MouseActuator.threshold
SCA_MouseActuator.reset_x
SCA_MouseActuator.reset_y
SCA_MouseActuator.object_axis
SCA_MouseActuator.local_x
SCA_MouseActuator.local_y
SCA_MouseActuator.sensitivity
SCA_MouseActuator.limit_x
SCA_MouseActuator.limit_y
SCA_MouseActuator.angle
- SCA_MouseFocusSensor(SCA_MouseSensor)
SCA_MouseFocusSensor
SCA_MouseFocusSensor.raySource
SCA_MouseFocusSensor.rayTarget
SCA_MouseFocusSensor.rayDirection
SCA_MouseFocusSensor.hitObject
SCA_MouseFocusSensor.hitPosition
SCA_MouseFocusSensor.hitNormal
SCA_MouseFocusSensor.hitUV
SCA_MouseFocusSensor.usePulseFocus
SCA_MouseFocusSensor.useXRay
SCA_MouseFocusSensor.mask
SCA_MouseFocusSensor.propName
SCA_MouseFocusSensor.useMaterial
- SCA_MouseSensor(SCA_ISensor)
- SCA_NANDController(SCA_IController)
- SCA_NORController(SCA_IController)
- SCA_NearSensor(KX_CollisionSensor)
- SCA_NetworkMessageActuator(SCA_IActuator)
- SCA_NetworkMessageSensor(SCA_ISensor)
- SCA_ORController(SCA_IController)
- SCA_ObjectActuator(SCA_IActuator)
SCA_ObjectActuator
SCA_ObjectActuator.force
SCA_ObjectActuator.useLocalForce
SCA_ObjectActuator.torque
SCA_ObjectActuator.useLocalTorque
SCA_ObjectActuator.dLoc
SCA_ObjectActuator.useLocalDLoc
SCA_ObjectActuator.dRot
SCA_ObjectActuator.useLocalDRot
SCA_ObjectActuator.linV
SCA_ObjectActuator.useLocalLinV
SCA_ObjectActuator.angV
SCA_ObjectActuator.useLocalAngV
SCA_ObjectActuator.damping
SCA_ObjectActuator.forceLimitX
SCA_ObjectActuator.forceLimitY
SCA_ObjectActuator.forceLimitZ
SCA_ObjectActuator.pid
SCA_ObjectActuator.reference
- SCA_ParentActuator(SCA_IActuator)
- SCA_PropertyActuator(SCA_IActuator)
- SCA_PropertySensor(SCA_ISensor)
- SCA_PythonController(SCA_IController)
- SCA_PythonJoystick(EXP_PyObjectPlus)
SCA_PythonJoystick
SCA_PythonJoystick.name
SCA_PythonJoystick.activeButtons
SCA_PythonJoystick.axisValues
SCA_PythonJoystick.hatValues
SCA_PythonJoystick.numAxis
SCA_PythonJoystick.numButtons
SCA_PythonJoystick.numHats
SCA_PythonJoystick.startVibration()
SCA_PythonJoystick.stopVibration()
SCA_PythonJoystick.strengthLeft
SCA_PythonJoystick.strengthRight
SCA_PythonJoystick.duration
SCA_PythonJoystick.isVibrating
SCA_PythonJoystick.hasVibration
- SCA_PythonKeyboard(EXP_PyObjectPlus)
- SCA_PythonMouse(EXP_PyObjectPlus)
- SCA_RadarSensor(SCA_NearSensor)
- SCA_RandomActuator(SCA_IActuator)
SCA_RandomActuator
SCA_RandomActuator.seed
SCA_RandomActuator.para1
SCA_RandomActuator.para2
SCA_RandomActuator.distribution
SCA_RandomActuator.propName
SCA_RandomActuator.setBoolConst()
SCA_RandomActuator.setBoolUniform()
SCA_RandomActuator.setBoolBernouilli()
SCA_RandomActuator.setIntConst()
SCA_RandomActuator.setIntUniform()
SCA_RandomActuator.setIntPoisson()
SCA_RandomActuator.setFloatConst()
SCA_RandomActuator.setFloatUniform()
SCA_RandomActuator.setFloatNormal()
SCA_RandomActuator.setFloatNegativeExponential()
- SCA_RandomSensor(SCA_ISensor)
- SCA_RaySensor(SCA_ISensor)
- SCA_ReplaceMeshActuator(SCA_IActuator)
- SCA_SceneActuator(SCA_IActuator)
- SCA_SoundActuator(SCA_IActuator)
SCA_SoundActuator
SCA_SoundActuator.volume
SCA_SoundActuator.time
SCA_SoundActuator.pitch
SCA_SoundActuator.mode
SCA_SoundActuator.sound
SCA_SoundActuator.is3D
SCA_SoundActuator.volume_maximum
SCA_SoundActuator.volume_minimum
SCA_SoundActuator.distance_reference
SCA_SoundActuator.distance_maximum
SCA_SoundActuator.attenuation
SCA_SoundActuator.cone_angle_inner
SCA_SoundActuator.cone_angle_outer
SCA_SoundActuator.cone_volume_outer
SCA_SoundActuator.startSound()
SCA_SoundActuator.pauseSound()
SCA_SoundActuator.stopSound()
- SCA_StateActuator(SCA_IActuator)
- SCA_SteeringActuator(SCA_IActuator)
SCA_SteeringActuator
SCA_SteeringActuator.behavior
SCA_SteeringActuator.velocity
SCA_SteeringActuator.acceleration
SCA_SteeringActuator.turnspeed
SCA_SteeringActuator.distance
SCA_SteeringActuator.target
SCA_SteeringActuator.navmesh
SCA_SteeringActuator.selfterminated
SCA_SteeringActuator.enableVisualization
SCA_SteeringActuator.pathUpdatePeriod
SCA_SteeringActuator.path
- SCA_TrackToActuator(SCA_IActuator)
- SCA_VibrationActuator(SCA_IActuator)
- SCA_VisibilityActuator(SCA_IActuator)
- SCA_XNORController(SCA_IController)
- SCA_XORController(SCA_IController)