hi,
I'm trying to debug why rayTest will skip certain (Kinematic bodies) collision objects when calling rayTestSingle works perfectly fine on them.
I'm using ClosestRayResultCallback.
At first I thought that it might be collision filter mask, but this type of collision object won't be even considered by needsCollision function...
All those objects collide fine in simulation step, it is just rayTest that is problematic.
Is there something special that I need to be aware of when using ratTest?
--
greetings,
Piotr
rayTest skips collision object when rayTestSingle works fine
-
obi
- Posts: 6
- Joined: Tue Aug 16, 2005 9:06 am
-
Erwin Coumans
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: rayTest skips collision object when rayTestSingle works fine
I haven't seen this before. Can you reproduce it in one of the Bullet demos, and attach a zipped reproduction case?
Thanks,
Erwin
Thanks,
Erwin
-
obi
- Posts: 6
- Joined: Tue Aug 16, 2005 9:06 am
Re: rayTest skips collision object when rayTestSingle works fine
I've finally found some time to look into this problem again: it seems that rayTest failed in calcTimeOfImpact function (see callstack below).
Callstack:
It failed on following test:
The solution on my end was to change the direction of my ray cast. Is it a bug?
Callstack:
Code: Select all
...
btCollisionWorld::rayTest(const btVector3&,const btVector3&,btCollisionWorld::RayResultCallback&) const
btDbvtBroadphase::rayTest(const btVector3&,const btVector3&,btBroadphaseRayCallback&,const btVector3&,const btVector3&)
BroadphaseRayTester::Process(const btDbvtNode*)
btSingleRayCallback::process(const btBroadphaseProxy*)
btCollisionWorld::rayTestSingle(const btTransform&,const btTransform&,btCollisionObject*,const btCollisionShape*,const btTransform&,btCollisionWorld::RayResultCallback&)
btSubsimplexConvexCast::calcTimeOfImpact(const btTransform&,const btTransform&,const btTransform&,const btTransform&,btConvexCast::CastResult&)Code: Select all
//don't report time of impact for motion away from the contact normal (or causes minor penetration)
if (result.m_normal.dot(r)>=-result.m_allowedPenetration)
return false;-
Erwin Coumans
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: rayTest skips collision object when rayTestSingle works fine
It seems a different issue from the first report (needsCollision is not involved).
Again, can you please share a reproduction case, by modifying any of the demos?
You can attach a zipfile to this forum, or file an issue in the tracker: http://code.google.com/p/bullet/issues/list
Thanks,
Erwin
Again, can you please share a reproduction case, by modifying any of the demos?
You can attach a zipfile to this forum, or file an issue in the tracker: http://code.google.com/p/bullet/issues/list
Thanks,
Erwin