Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 959 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Collision event for many Entities #422256
05/06/13 12:27
05/06/13 12:27
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline OP
Serious User
Ch40zzC0d3r  Offline OP
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
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.

Last edited by Ch40zzC0d3r; 05/06/13 12:27.
Re: Collision event for many Entities [Re: Ch40zzC0d3r] #422258
05/06/13 12:40
05/06/13 12:40
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
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).

Re: Collision event for many Entities [Re: 3dgs_snake] #422259
05/06/13 12:44
05/06/13 12:44
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline OP
Serious User
Ch40zzC0d3r  Offline OP
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
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 :|


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1