blender/source/gameengine/Ketsji
Benoit Bolsee 3ea1c1b4b6 BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility.
A new type of "Sensor" physics object is available in the GE for advanced
collision management. It's called Sensor for its similarities with the
physics objects that underlie the Near and Radar sensors.
Like the Near and Radar object it is:
- static and ghost
- invisible by default
- always active to ensure correct collision detection
- capable of detecting both static and dynamic objects
- ignoring collision with their parent
- capable of broadphase filtering based on:
  * Actor option: the collisioning object must have the Actor flag set to be detected
  * property/material: as specified in the collision sensors attached to it
  Broadphase filtering is important for performance reason: the collision points
  will be computed only for the objects that pass the broahphase filter.
- automatically removed from the simulation when no collision sensor is active on it

Unlike the Near and Radar object it can:
- take any shape, including triangle mesh
- be made visible for debugging (just use the Visible actuator)
- have multiple collision sensors using it

Other than that, the sensor objects are ordinary objects. You can move them
freely or parent them. When parented to a dynamic object, they can provide
advanced collision control to this object.

The type of collision capability depends on the shape:
- box, sphere, cylinder, cone, convex hull provide volume detection.
- triangle mesh provides surface detection but you can give some volume
  to the suface by increasing the margin in the Advanced Settings panel.
  The margin applies on both sides of the surface.

Performance tip:
- Sensor objects perform better than Near and Radar: they do less synchronizations
  because of the Scenegraph optimizations and they can have multiple collision sensors
  on them (with different property filtering for example).
- Always prefer simple shape (box, sphere) to complex shape whenever possible.
- Always use broadphase filtering (avoid collision sensor with empty propery/material)
- Use collision sensor only when you need them. When no collision sensor is active
  on the sensor object, it is removed from the simulation and consume no CPU.

Known limitations:
- When running Blender in debug mode, you will see one warning line of the console:
  "warning btCollisionDispatcher::needsCollision: static-static collision!"
  In release mode this message is not printed.
- Collision margin has no effect on sphere, cone and cylinder shape.

Other performance improvements:
- Remove unnecessary interpolation for Near and Radar objects and by extension
  sensor objects.
- Use direct matrix copy instead of quaternion to synchronize orientation.

Other bug fix:
- Fix Near/Radar position error on newly activated objects. This was causing
  several detection problems in YoFrankie
- Fix margin not passed correctly to gImpact shape.
- Disable force/velocity actions on static objects
2009-05-17 12:51:51 +00:00
..
KXNetwork Fix Makefiles for gameengine. 2009-05-11 15:34:46 +00:00
BL_BlenderShader.cpp BGE performance, 3rd round: culling and rasterizer. 2009-05-07 09:13:01 +00:00
BL_BlenderShader.h BGE performance, 3rd round: culling and rasterizer. 2009-05-07 09:13:01 +00:00
BL_Material.cpp BGE: speed up mesh conversion by avoiding allocation/deallocation of material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene. 2009-04-29 10:06:38 +00:00
BL_Material.h BGE: speed up mesh conversion by avoiding allocation/deallocation of material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene. 2009-04-29 10:06:38 +00:00
BL_Shader.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
BL_Shader.h BGE Python API 2009-04-20 23:17:52 +00:00
BL_Texture.cpp BGE Python API 2009-02-19 13:42:07 +00:00
BL_Texture.h Preparation to VideoTexture: everything but the VideoTexture module itself. 2008-10-31 21:06:48 +00:00
CMakeLists.txt added Geometry as a BGE module, removed its dependency on gen_utils.c 2009-04-30 12:45:13 +00:00
KX_BlenderMaterial.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_BlenderMaterial.h BGE performance, 3rd round: culling and rasterizer. 2009-05-07 09:13:01 +00:00
KX_BulletPhysicsController.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_BulletPhysicsController.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_Camera.cpp BGE PyAPI 2009-05-14 23:06:05 +00:00
KX_Camera.h BGE PyAPI 2009-05-14 23:06:05 +00:00
KX_CameraActuator.cpp Name attributes added since 2.48a more consistently. 2009-05-15 03:26:53 +00:00
KX_CameraActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_CameraIpoSGController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_CameraIpoSGController.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_CDActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_CDActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_ClientObjectInfo.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_ConstraintActuator.cpp Name attributes added since 2.48a more consistently. 2009-05-15 03:26:53 +00:00
KX_ConstraintActuator.h BGE C++ API 2009-04-22 14:42:00 +00:00
KX_ConstraintWrapper.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_ConstraintWrapper.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_ConvertPhysicsObject.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_ConvertPhysicsObjects.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_Dome.cpp BGE Dome: Reducing FBO size to warped meshes. 2009-05-09 21:54:22 +00:00
KX_Dome.h BGE Dome: Truncated Dome are back (Upright and Downright) + GLEW_EXT_framebuffer_object check before generating FBO 2009-05-08 18:59:08 +00:00
KX_EmptyObject.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_EmptyObject.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_GameActuator.cpp Name attributes added since 2.48a more consistently. 2009-05-15 03:26:53 +00:00
KX_GameActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_GameObject.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_GameObject.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_IInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_IPhysicsController.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_IPhysicsController.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_IPO_SGController.cpp BGE bug #18596: No ipo dynamics is 2.49rc1. 2009-05-11 23:05:13 +00:00
KX_IPO_SGController.h BGE bug #17657 fixed: dRotY doesn't work properly after 90 degrees rotation. 2008-09-23 20:07:15 +00:00
KX_IpoActuator.cpp Name attributes added since 2.48a more consistently. 2009-05-15 03:26:53 +00:00
KX_IpoActuator.h BGE C++ API 2009-04-22 14:42:00 +00:00
KX_IPOTransform.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_IScalarInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ISceneConverter.h Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_ISystem.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_KetsjiEngine.cpp BGE performance, 3rd round: culling and rasterizer. 2009-05-07 09:13:01 +00:00
KX_KetsjiEngine.h BGE performance: 2009-05-01 20:34:23 +00:00
KX_Light.cpp BGE PyAPI 2009-05-14 23:06:05 +00:00
KX_Light.h BGE #18732: Python Light options don't work with GLSL materials. Commited patch from dfelinto and moguri, thanks for the good work. 2009-05-13 06:42:15 +00:00
KX_LightIpoSGController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_LightIpoSGController.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_MaterialIpoController.cpp Win64: please check my changes if you ran across them ;) But should be fine since no additional crashes were reported! 2008-08-17 17:08:00 +00:00
KX_MaterialIpoController.h BGE patch: approve patch #17312: Multiple material IPOs per mesh in BGE. 2008-07-25 13:45:57 +00:00
KX_MeshProxy.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_MeshProxy.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_MotionState.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_MotionState.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_MouseFocusSensor.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_MouseFocusSensor.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_NearSensor.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_NearSensor.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_ObColorIpoSGController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ObColorIpoSGController.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ObjectActuator.cpp BGE API cleanup: motion actuator. Apply patch from Moguri. 2009-05-13 16:48:33 +00:00
KX_ObjectActuator.h BGE API cleanup: motion actuator. Apply patch from Moguri. 2009-05-13 16:48:33 +00:00
KX_OdePhysicsController.cpp BGE patch: dynamically update the coumpound parent shape when parenting to a compound object. 2009-01-13 22:59:18 +00:00
KX_OdePhysicsController.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_OrientationInterpolator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_OrientationInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ParentActuator.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_ParentActuator.h BGE Py API patch from Mitchell Stokes, adds extra attributes and docs 2009-05-02 02:40:11 +00:00
KX_PhysicsEngineEnums.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PhysicsObjectWrapper.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_PhysicsObjectWrapper.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_PhysicsPropertiesobsolete.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PolygonMaterial.cpp BGE performance, 3rd round: culling and rasterizer. 2009-05-07 09:13:01 +00:00
KX_PolygonMaterial.h BGE: speed up mesh conversion by avoiding allocation/deallocation of material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene. 2009-04-29 10:06:38 +00:00
KX_PolyProxy.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_PolyProxy.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_PositionInterpolator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PositionInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PyConstraintBinding.cpp python modules in the game engine could point to builtin modules like GameLogic that was cleared. 2009-04-29 23:39:27 +00:00
KX_PyConstraintBinding.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PyMath.cpp [#18606] Writing to KX_GameObject.orientation causes crash 2009-04-25 07:17:36 +00:00
KX_PyMath.h BGE Python API 2009-04-20 09:13:59 +00:00
KX_PythonInit.cpp setting up the BGE Python sys.path for importing modules wasnt working for library paths. 2009-05-16 13:19:23 +00:00
KX_PythonInit.h added Geometry as a BGE module, removed its dependency on gen_utils.c 2009-04-30 12:45:13 +00:00
KX_PythonInitTypes.cpp BGE Py API Bugfixes 2009-05-16 00:49:28 +00:00
KX_PythonInitTypes.h SVN maintenance. 2009-04-13 19:33:22 +00:00
KX_PythonSeq.cpp use the same sequence mapping types as CListValue, hopefully this means it will build on different python versions 2009-05-10 22:33:21 +00:00
KX_PythonSeq.h deprecate controller.getActuator(name) and controller.getSensor(name) for 2009-05-10 01:48:14 +00:00
KX_RadarSensor.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_RadarSensor.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_RayCast.cpp BGE Bugfixes (mostly in the py api) 2009-04-05 14:01:49 +00:00
KX_RayCast.h BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information. 2008-08-27 19:34:19 +00:00
KX_RayEventManager.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_RayEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_RaySensor.cpp Name attributes added since 2.48a more consistently. 2009-05-15 03:26:53 +00:00
KX_RaySensor.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_SCA_AddObjectActuator.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_SCA_AddObjectActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SCA_DynamicActuator.cpp Name attributes added since 2.48a more consistently. 2009-05-15 03:26:53 +00:00
KX_SCA_DynamicActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SCA_EndObjectActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_SCA_EndObjectActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SCA_ReplaceMeshActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_SCA_ReplaceMeshActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_ScalarInterpolator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ScalarInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ScalingInterpolator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ScalingInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_Scene.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_Scene.h BGE Py API 2009-05-14 07:59:44 +00:00
KX_SceneActuator.cpp BGE Py API 2009-05-14 07:59:44 +00:00
KX_SceneActuator.h BGE Py API 2009-05-14 07:59:44 +00:00
KX_SG_BoneParentNodeRelationship.cpp BGE performance: second round of scenegraph improvement. 2009-05-03 22:29:00 +00:00
KX_SG_BoneParentNodeRelationship.h BGE Scenegraph and View frustrum culling improvement. 2009-04-07 22:14:06 +00:00
KX_SG_NodeRelationships.cpp BGE performance: second round of scenegraph improvement. 2009-05-03 22:29:00 +00:00
KX_SG_NodeRelationships.h BGE Scenegraph and View frustrum culling improvement. 2009-04-07 22:14:06 +00:00
KX_SoundActuator.cpp Name attributes added since 2.48a more consistently. 2009-05-15 03:26:53 +00:00
KX_SoundActuator.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_StateActuator.cpp BGE: fix a compatibility problem since logic patch with YoFrankie (and other games I guess). State actuators will now execute before any other actuators to make sure that the actuators link count are up to date when they execute. 2009-05-15 20:51:32 +00:00
KX_StateActuator.h BGE: fix a compatibility problem since logic patch with YoFrankie (and other games I guess). State actuators will now execute before any other actuators to make sure that the actuators link count are up to date when they execute. 2009-05-15 20:51:32 +00:00
KX_SumoPhysicsController.cpp BGE patch #18051: add localInertia attribute to GameObject. 2009-04-08 16:25:00 +00:00
KX_SumoPhysicsController.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_TimeCategoryLogger.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_TimeCategoryLogger.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_TimeLogger.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_TimeLogger.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_TouchEventManager.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_TouchEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_TouchSensor.cpp BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_TouchSensor.h BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility. 2009-05-17 12:51:51 +00:00
KX_TrackToActuator.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_TrackToActuator.h BGE C++ API 2009-04-22 14:42:00 +00:00
KX_VehicleWrapper.cpp python3 compatibility for the BGE api, this only works with scons when WITH_BF_NOBLENDER is enabled. 2009-05-07 05:23:15 +00:00
KX_VehicleWrapper.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_VertexProxy.cpp BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_VertexProxy.h BGE performance, 4th round: logic 2009-05-10 20:53:58 +00:00
KX_VisibilityActuator.cpp Name attributes added since 2.48a more consistently. 2009-05-15 03:26:53 +00:00
KX_VisibilityActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_WorldInfo.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_WorldInfo.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_WorldIpoController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_WorldIpoController.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
Makefile Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
SConscript python3 compatibility for the BGE api, this only works with scons when WITH_BF_NOBLENDER is enabled. 2009-05-07 05:23:15 +00:00