Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TedMar, AndrewAMD), 1,344 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 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 | 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