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
..
2015-07-12 16:58:12 +02:00
2015-10-06 22:22:47 -07:00
2015-10-06 22:22:47 -07:00
2015-10-06 22:22:47 -07:00
2015-10-06 22:22:47 -07:00
2015-07-20 22:29:26 +02:00
2013-08-18 14:15:51 +00:00
2015-07-14 22:36:00 +10:00
2015-07-14 22:36:00 +10:00
2014-10-07 15:47:32 -05:00
2015-07-12 16:58:12 +02:00
2015-07-27 20:34:13 +02:00
2012-10-09 13:36:42 +00:00
2015-07-28 14:01:53 +02:00
2013-03-18 11:44:56 +00:00
2012-10-09 13:36:42 +00:00
2015-07-14 22:36:00 +10:00
2015-07-14 22:36:00 +10:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2012-10-09 13:36:42 +00:00
2012-10-09 13:36:42 +00:00
2013-11-04 19:22:47 +00:00
2015-07-12 16:58:12 +02:00
2015-07-25 09:43:06 +02:00
2015-10-07 22:14:43 +02:00
2015-10-07 22:14:43 +02:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-06-22 18:16:31 +02:00
2014-10-07 15:47:32 -05:00
2012-10-09 13:36:42 +00:00
2015-07-12 16:58:12 +02:00
2015-03-16 18:46:40 +01:00
2015-06-05 11:16:46 +10:00
2012-07-18 23:03:27 +00:00
2015-10-07 22:14:43 +02:00
2015-10-07 22:14:43 +02:00
2012-09-16 04:58:18 +00:00
2013-11-04 19:22:47 +00:00
2012-10-09 13:36:42 +00:00
2015-07-12 16:58:12 +02:00
2012-10-09 13:36:42 +00:00
2015-05-11 23:05:04 -07:00
2015-03-23 21:43:42 +01:00
2012-10-29 02:11:40 +00:00
2012-09-16 04:58:18 +00:00
2015-07-12 16:58:12 +02:00
2012-06-25 09:14:37 +00:00
2015-08-25 13:42:09 +02:00
2015-08-25 13:42:09 +02:00
2015-04-26 16:29:58 +02:00
2015-04-26 16:29:58 +02:00
2014-03-27 22:32:06 -07:00
2014-04-12 20:12:07 +02:00
2015-05-11 23:05:04 -07:00
2012-10-09 13:36:42 +00:00
2015-07-12 16:58:12 +02:00
2013-03-29 06:21:28 +00:00
2013-11-04 19:22:47 +00:00
2013-11-04 19:22:47 +00:00
2015-06-14 04:53:10 +10:00
2015-06-14 04:53:10 +10:00
2015-10-07 22:14:43 +02:00
2015-10-07 22:14:43 +02:00
2015-07-28 13:54:41 +02:00
2015-07-12 16:58:12 +02:00
2014-02-22 13:57:12 +11:00
2012-10-09 13:36:42 +00:00
2013-02-23 01:17:01 +00:00
2012-10-09 13:36:42 +00:00
2015-06-02 11:08:17 +10:00
2015-05-14 09:45:51 +02:00
2013-08-04 17:20:03 +00:00
2012-09-16 04:58:18 +00:00
2012-02-25 16:49:59 +00:00
2012-06-25 09:14:37 +00:00
2015-07-12 16:58:12 +02:00
2012-10-09 13:36:42 +00:00
2012-10-09 13:36:42 +00:00
2015-06-20 14:21:31 +02:00
2013-08-03 23:58:17 +00:00
2012-02-25 16:49:59 +00:00
2012-06-25 09:14:37 +00:00
2015-08-16 11:38:25 +02:00
2015-02-03 15:32:54 +00:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-08-25 13:42:09 +02:00
2015-07-12 16:58:12 +02:00
2015-07-03 11:47:48 +02:00
2015-02-09 20:56:38 +00:00
2012-10-23 11:47:23 +00:00
2013-11-18 18:13:23 +06:00
2013-11-17 15:09:57 +11:00
2015-07-12 16:58:12 +02:00
2013-11-04 19:22:47 +00:00
2012-10-09 13:36:42 +00:00
2013-11-04 19:22:47 +00:00
2015-10-07 22:14:43 +02:00
2012-10-09 13:36:42 +00:00
2015-10-07 22:14:43 +02:00
2015-10-07 22:14:43 +02:00
2015-07-12 16:58:12 +02:00
2012-10-21 05:46:41 +00:00
2015-08-10 17:08:11 +02:00
2013-11-04 19:22:47 +00:00
2012-11-10 05:42:50 +00:00
2012-08-18 13:07:48 +00:00
2015-07-12 16:58:12 +02:00
2012-10-09 13:36:42 +00:00
2012-02-25 16:49:59 +00:00
2012-06-25 09:14:37 +00:00
2012-02-25 16:49:59 +00:00
2012-06-25 09:14:37 +00:00
2015-08-18 12:24:38 +02:00
2015-07-12 16:58:12 +02:00
2013-03-26 07:29:01 +00:00
2012-10-09 13:36:42 +00:00
2012-09-16 04:58:18 +00:00
2012-09-16 04:58:18 +00:00
2012-09-16 04:58:18 +00:00
2012-09-16 04:58:18 +00:00
2015-08-02 11:27:02 +02:00
2015-07-28 14:01:53 +02:00
2015-09-02 18:39:19 +10:00
2015-02-18 23:24:02 +01:00
2012-04-11 08:15:13 +00:00
2012-10-15 02:15:07 +00:00
2012-04-11 08:15:13 +00:00
2012-10-15 02:15:07 +00:00
2015-02-08 15:52:13 +01:00
2015-02-08 15:52:13 +01:00
2015-07-25 09:43:06 +02:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2014-07-14 18:30:27 -07:00
2015-07-12 16:58:12 +02:00
2015-07-12 16:58:12 +02:00
2015-06-06 13:12:27 -07:00
2015-06-06 13:12:27 -07:00
2015-06-24 13:03:23 +02:00
2015-09-08 19:42:58 +10:00
2015-03-23 21:43:42 +01:00
2015-03-23 21:43:42 +01:00
2015-08-04 18:06:28 +02:00