About Store Forum Documentation Contact



Post Reply 
PhysHitCallback hit sequence
Author Message
krokodilcapa Offline
Member

Post: #1
PhysHitCallback hit sequence
Hi!

Maybe I'm doing something wrong, but it seems to me, that PhysHitCallback's hit sequence is wrong. I try to simulate bullethit with penetration, but if I stop checking with return false (in hit method), sometimes I get the wrong hit. For example, if I stop it at the first collision, then sometimes the bullet goes through a wall (without hit), and hits only the ground behind the wall. If I don't stop it, then hit the both, and its good. I'm testing it for days now, and the code seems okay to me, I can't find any problem.
02-17-2015 01:14 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: PhysHitCallback hit sequence
Hi,

It may be possible that PhysX does not return the collisions in order, for performance reasons.
This would need to be checked in either PhysX SDK headers or documentation.
02-17-2015 10:02 PM
Find all posts by this user Quote this message in a reply
krokodilcapa Offline
Member

Post: #3
RE: PhysHitCallback hit sequence
Okay, thanks for your fast answer! Then I'll looking for that, and respond if I'll find something about that.
02-18-2015 01:09 AM
Find all posts by this user Quote this message in a reply
krokodilcapa Offline
Member

Post: #4
RE: PhysHitCallback hit sequence
Maybe I should sort my impact container by the hit distances to get the right sequence, and only after compute if the bullet is penetrate, or stop and be killed.
02-18-2015 04:22 PM
Find all posts by this user Quote this message in a reply
Post Reply