Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,561 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
collison event and physx #394703
02/15/12 21:57
02/15/12 21:57
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline OP
Member
flatron  Offline OP
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
hi
i want to play a sound when my ball collide with abjects based on their material.

collision for ball and grass sound1.wav
collision for ball and stone sound2.wav


but my problem is in pXent_setcollisionflag command i can just set one object to inform me collision with my object.
what about the others?

i can't use this code:
pXent_setcollisionflag ( entity1, entity2, NX_NOTIFY_ON_START_TOUCH)
ent.event = EventImpact1;

pXent_setcollisionflag ( entity1, entity3, NX_NOTIFY_ON_START_TOUCH)
ent.event = EventImpact2;

is there any solution?

Re: collison event and physx [Re: flatron] #394708
02/15/12 23:32
02/15/12 23:32
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline OP
Member
flatron  Offline OP
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
if i set the second pointer in pXent_setcollisionflag command to NULL then i have a collision with level

at first what dose it mean in found in manual for above command:
" or NULL for collisions with the level when it was registered for physics"


i find out if i set the second parameter to NULL "all" physically static object report collision.

but what can i do for RIGID bodys?

Re: collison event and physx [Re: flatron] #394795
02/16/12 16:56
02/16/12 16:56
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Simply compare the you pointer in the event to check if entity2 or entity3 was hit.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Moderated by  HeelX, Spirit 

Gamestudio download | 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