## NewtonCollisionPointDistance - Example

Share with us how are you using the powerrrr of the force

Moderator: Alain

but then "if an object was behind a wall but only half of it was behind the wall and the closest point to the tnt was behind the wall but there was bits of the object that the tnt could push that weren't behind the wall then the closest point thing would fail...".

Stucuk

Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

...cast a number of rays to the object's bounding-box extents, LODed by the object's size (or perpendicular projection) and its distance from explosion?
Aphex

Posts: 144
Joined: Fri Jun 18, 2004 6:08 am
Location: UK

I was going to say the same.
It all depends on how much you want to invest on the effect. You can sample few point of the object with ray cast and determine how much is hidden but the obstacle and weighting the strength by the ration of the hit point to the number of ray.
Just remember that the more you put into it the more expensive in becomes.
Julio Jerez
Moderator

Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

shouldn't be that expensive. If u take an average FPS game, there isn't normaly lots of things in each area. So a grenade for example would proberly be hitting 10 objects max on average. (even if u look at HL2 there is never more than about 10 objects in one room.)

Stucuk

Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

You don't want to be lowering yourself to HL2's standards though!
Aphex

Posts: 144
Joined: Fri Jun 18, 2004 6:08 am
Location: UK

Previous