Collision event for many Entities

Posted By: Ch40zzC0d3r

Collision event for many Entities - 05/06/13 12:27

Hey guys!
Today I got stuck. Im trying to code a grenade launcher so far everythign works fine. But I want to recognize if the grenade has hit something, so I read the manual and got this piece of code:
Code:
pXent_setcollisionflag ( entity1, entity2, var event)



It seems the event is only triggered when its one of the entities I insert there :|
I know this is right but how should I do this for EVERY entity I have in my level? o.0
I dont want to loop through them all.
Does someone has got an Idea?
Thanks in advance, Ch40zz.
Posted By: 3dgs_snake

Re: Collision event for many Entities - 05/06/13 12:40

I think that it is the only way to do it in the default plugin. With physX3 plugin you can use scene queries to check if you hit something (But you still need a loop).
Posted By: Ch40zzC0d3r

Re: Collision event for many Entities - 05/06/13 12:44

Then Im using another method, simply check for the velocity every frame and when its too slow Its gonna explode. Works better then these hitflags, sometimes it wont even explode -.-
PhysX isnt very good :|
© 2024 lite-C Forums