Hi,
I guess SpuBatchRaycaster is designed to return the closest hit point. If a ray collides with more than one object, how do I get info of all the hit points?
Thanks,
Sandeep.
SpuBatchRaycaster question
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: SpuBatchRaycaster question
When you need all hit points, use the btCollisionWorld::rayTest instead.
Hope this helps,
Erwin
Hope this helps,
Erwin
-
- Posts: 48
- Joined: Thu Jul 10, 2008 6:36 pm
Re: SpuBatchRaycaster question
Thanks Erwin.
I see that in case of SPUs (multi-threaded version), Bullet buffers/queues up all collision requests before performing actual collision. (For e.g. in SpuBatchRaycaster, there is addRay() func, which buffers all the rays before doing collision.)
I was wondering if I can do the same thing in PPU version for RayCasting?...
Is it possible to change SpuBatchRaycaster code, so that it collects all hitpoints rather than just the closest hit...?
Thanks in advance.
I see that in case of SPUs (multi-threaded version), Bullet buffers/queues up all collision requests before performing actual collision. (For e.g. in SpuBatchRaycaster, there is addRay() func, which buffers all the rays before doing collision.)
I was wondering if I can do the same thing in PPU version for RayCasting?...
Is it possible to change SpuBatchRaycaster code, so that it collects all hitpoints rather than just the closest hit...?
Thanks in advance.
-
- Posts: 133
- Joined: Wed Jul 27, 2005 1:05 pm
- Location: Berkeley, CA
Re: SpuBatchRaycaster question
What could be done is to support an user defined buffer to store the hit results. That way you could get the closest 16, for example, hits. This is something we plan on supporting in the future.
John
John