blender/source/gameengine/Rasterizer
Porteries Tristan 720d4521cd BGE : Collision mask support in raycast + and raycast cleanup.
I have removed the m_pHitObject, m_xray and m_testPropName and replace them by a temporary struct "RayCastData" which contains these datas and a collision mask. Finally i add a collision mask argument in the python function "rayCast" :
```
rayCast(to, from, dist, prop, face, xray, poly, mask)
```

It can be useful to hit only object which are on the right colision layer. for example if you have hitbox for a charater or vehicle you don't want to hit it with raycast.

test file : {F237337}
left mouse click on two planes and see console messages.

Somewhat more elaborate test file by @sybren: {F237779}
Look around and click on the cubes. One cube lamp responds, the other doesn't, based on their collision groups.

Reviewers: moguri, hg1, agoose77, campbellbarton, sybren

Reviewed By: agoose77, campbellbarton, sybren

Subscribers: campbellbarton, sergey, blueprintrandom, sybren

Projects: #game_engine, #game_physics

Differential Revision: https://developer.blender.org/D1239
2015-10-07 22:14:43 +02:00
..
RAS_OpenGLFilters code cleanup: bge warnings 2013-04-04 23:16:23 +00:00
RAS_OpenGLRasterizer BGE : Collision mask support in raycast + and raycast cleanup. 2015-10-07 22:14:43 +02:00
CMakeLists.txt Ghost Context Refactor 2014-10-07 15:47:32 -05:00
RAS_2DFilterManager.cpp Fix T45981: BGE, 2D filters leak memory 2015-09-08 19:42:59 +10:00
RAS_2DFilterManager.h BGE Rasterizer Cleanup: Cleaning up some includes. 2013-11-04 19:22:10 +00:00
RAS_BucketManager.cpp Fix T38379: Mesh vertices only update when in cone of last created spotlight 2014-05-12 23:13:27 -07:00
RAS_BucketManager.h Fix T40199: bge.logic.LibFree() could cause crashes by leaving dangling pointers in the rasterizer. 2014-05-14 19:11:08 -07:00
RAS_CameraData.h Fix 73841 : Game Engine - Camera Lens Shift 2015-06-29 10:45:27 -03:00
RAS_Deformer.h code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
RAS_FramingManager.cpp Fix 73841 : Game Engine - Camera Lens Shift 2015-06-29 10:45:27 -03:00
RAS_FramingManager.h Fix 73841 : Game Engine - Camera Lens Shift 2015-06-29 10:45:27 -03:00
RAS_ICanvas.h BGE: New API method getDisplayDimensions 2015-04-07 18:32:25 +02:00
RAS_ILightObject.h Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
RAS_IPolygonMaterial.cpp Move from MTFace to MTexPoly w/ texture checks 2015-07-14 22:36:00 +10:00
RAS_IPolygonMaterial.h Move from MTFace to MTexPoly w/ texture checks 2015-07-14 22:36:00 +10:00
RAS_IRasterizer.h BGE: Fix T19241: draw debug shape with overlay/background scene. 2015-07-27 13:49:06 +02:00
RAS_MaterialBucket.cpp BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy 2015-06-20 14:21:31 +02:00
RAS_MaterialBucket.h BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy 2015-06-20 14:21:31 +02:00
RAS_MeshObject.cpp BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy 2015-06-20 14:21:31 +02:00
RAS_MeshObject.h BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy 2015-06-20 14:21:31 +02:00
RAS_ObjectColor.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
RAS_Polygon.cpp BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy 2015-06-20 14:21:31 +02:00
RAS_Polygon.h BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy 2015-06-20 14:21:31 +02:00
RAS_Rect.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
RAS_texmatrix.cpp Cleanup: spelling 2015-08-22 21:17:32 +10:00
RAS_TexMatrix.h code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
RAS_TexVert.cpp Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
RAS_TexVert.h BGE: Cleaning up the VBO code to use RAS_TexVert more directly instead of copying out pieces. This also gets rid of MapBuffers, which isn't available in OpenGL ES. Scenes that require constant VBO updates (like my skeletal mesh stress test) are now 10~13% faster. 2013-04-05 01:28:38 +00:00
SConscript SCons: Fix for really nasty bug with polluting configuration environment 2015-08-04 18:06:28 +02:00