Hi Gareth,

Java 3D allows collision culling.  The default is that everything is
collidable.  The two relevant methods from the Node class are:


void  setCollidable(boolean collidable) 
                  Sets the collidable value; determines whether this 
                  node and any of its children, if a group node, can
                  be considered for collision purposes.        

boolean  getCollidable() 
                  Returns the collidable value; this value determines 
                  whether this node and it's children, if a group
                  node, can be considered for collision purposes; if 
                  it is set to false, then neither this node nor any 
                  children nodes will be traversed for collision 
                  purposes; the default value is true.


In addition to achieving what you want, collision culling can also
enable an application to be more efficient, since the culled parts of
the scene graph will be ignored by the Java 3D collision code.

Travis Bryson
Sun Microsystems



> From: "Gareth Powell" <[EMAIL PROTECTED]>
> To: "Java3D" <[EMAIL PROTECTED]>
> Subject: [java3d] Collision Detection
> Date: Thu, 8 Apr 1999 18:11:35 +0100
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
> 
> I have 3 visible objects in my world, a Box (primitive and non-moving) and 2
> Shape3D boxes (moving). I have written a Behavior class to detect collisions
> between the objects and this works fine.
> 
> The problem is I don't want the moving boxes to detect the collision with
> the static, non-moving  box. A collision should be signaled when they
> collide with one another and at no other time.
> 
> Is there any way of excluding an object from collision detection.
> 
> Can anybody help?
> 
> Thanks..
> 
> 
> Gareth.
> 
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to