Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Newton Collision except on object

Author
Message
Psycho Joker
19
Years of Service
User Offline
Joined: 13th Jul 2005
Location:
Posted: 30th Mar 2006 07:11
Is their a way to have a object not have collision with another in Newton? I'm throwing a grenade but it hits the players collision sphere and nocks him back.



this picture may help you to see what I mean.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Mar 2006 10:32
NDB_NewtonMaterialSetDefaultCollidable

Allows you to state that 2 materials do not create a collision.

Quote: "syntax: NDB_NewtonMaterialSetDefaultCollidable mat1, mat2, state
mat1 index of first material (integer)
mat2 index of second material (integer)
state state for this pair. 1 = collidable, 0 non-collidable

"


Psycho Joker
19
Years of Service
User Offline
Joined: 13th Jul 2005
Location:
Posted: 30th Mar 2006 23:17 Edited at: 30th Mar 2006 23:38
I tried this but it didn't work.

NDB_NewtonMaterialSetDefaultCollidable grenade, player, 0

It ends the program for some reason.

repost:

I added this to the code and it works now. The force is messed up but I think I can fix that easily.

NDB_NewtonMaterialSetDefaultCollidable PlayerID,GrenadeID, 0
NDB_NewtonMaterialSetCollisionCallback PlayerID,GrenadeID
Psycho Joker
19
Years of Service
User Offline
Joined: 13th Jul 2005
Location:
Posted: 31st Mar 2006 07:03
Ok.. I have the force to work on the Grenade but I can't get the rotation of the grenade to match that of the player.

this is the code I use to tell the grenade what to do.

Login to post a reply

Server time is: 2024-11-27 22:52:51
Your offset time is: 2024-11-27 22:52:51