The problem people generally want to solve is not really collision
detection, but collision prediction and collision avoidance. Before you move
your object, you need to check to see if the new location will result in
there being a collision, if so then you do NOT actually make the move.
Since java 3d reports after there has been a collision, it is generally too
late to stop the objects from merging.  There are two solutions people seem
to do.  one is to sort all your polygons in to a 3d tree of some kind, like
an oct-tree, use this to find objects which are in close proximity to your
moving object, then do more detailed checking.  The other is to send out
pickrays in the direction your object is moving to find objects to check
against.  To do the actual check you can check all the polygons, or using
bounding volumns to check for intersections.

Dave Yazel
Cosm Development Team

> ----------
> From:         Tina Manoharan Valappil[SMTP:[EMAIL PROTECTED]]
> Reply To:     Discussion list for Java 3D API
> Sent:         Thursday, November 16, 2000 10:39 AM
> To:   [EMAIL PROTECTED]
> Subject:      [JAVA3D] Collision Detection!
>
> Hello,
>
> I saw the collision detection program under the demos for java3D. But what
> the program does is, it changes the color of the object that collides with
> another object in the scenegraph. But, what if I want to stop the object
> from passing through the other object. Can somebody help me please. Maybe
> an example program would be really nice.
>
> Thanks in advance
> tina
>
> Tina Manoharan
> PhD. Heriot Watt University
> Ph: 07801 069485 (mobile)
> Ph: 0131 449 5111 ext. 4191 (office)
> Ph: 0131 449 5111 ext. 4197 (lab)
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to