|
Post by Elemenop on Jul 24, 2004 7:21:16 GMT 1
This is hard to explain exactly what Im looking for. I'll try to make it simple. A screen of objects(all newton), randomly placed and a long box(some may call it a rectangle) which is also a newton object and is the height of the screen, that moves across the screen left to right but only collides/pushes one of the objects on screen with it and leaves the rest untouched, but the object it pushes can collide with the other objects on screen. So I want a object that only has collision with 1 of object in a screen of many. Would NDB_GetCollision be a useful command??
|
|
|
Post by Kjelle69 on Jul 24, 2004 17:13:23 GMT 1
certainly possible. look at the Material commands.
what you need, it to make 2 materials. one is the "wiper" material, and one is the "box" material.
assign the "wiper" material to the big box that scans across the screen.
assign the "box" material to the one box you want to be affected.
then use the NDB_NewtonMaterialSetDefaultCollidable command.
try this:
GeneralID = NDB_NewtonMaterialGetDefaultGroupID Pusher = NDB_NewtonMaterialCreateGroupID Box = NDB_NewtonMaterialCreateGroupID
NDB_NewtonMaterialSetDefaultCollidable Box, GeneralID, 0
** create your bodies here, set the materials accordingly**
now the Pusher won't collide with general bodies, but will collide with the special box. the box will collide with all bodies.
that should do it.
|
|