Hello,
I'm using the btCollisionWorld::rayTest function, and I'm seeing results that lead me to believe that there isn't a proper raytest (ie: colliding an unending ray against the simulation world). Looking at the raytest involved with grabbing an object in the demo suite seems to support this. I've got a workaround (scaling the vector defined by the from and to vectors to a large degree) but I just wanted to make sure there wasn't some function I missed that does this.
Thanks
- Alex
Ray casting question
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Ray casting question
The btCollisionWorld::rayTest is designed as a ray segment test indeed, it requires a start and end point.
Isn't it possible to turn your 'unbounded' ray (from,dir) into a ray segment that fits into this API using (from,to)?
Thanks,
Erwin
Isn't it possible to turn your 'unbounded' ray (from,dir) into a ray segment that fits into this API using (from,to)?
Thanks,
Erwin
-
- Posts: 141
- Joined: Mon Jul 02, 2007 5:12 pm
Re: Ray casting question
Hi Erwin,
Thanks for the quick reply. It certainly is possible, and in fact it's already done. It was a simple matter of scaling the ray defined by my from and to vectors by the dimension of my world AABB. This worked fine, but another question just now occurred to me. Is there any danger in colliding a segment that extends outside of the world AABB?
Thanks.
- Alex
Thanks for the quick reply. It certainly is possible, and in fact it's already done. It was a simple matter of scaling the ray defined by my from and to vectors by the dimension of my world AABB. This worked fine, but another question just now occurred to me. Is there any danger in colliding a segment that extends outside of the world AABB?
Thanks.
- Alex