Hi!

I think the ENABLE_COLLISION_REPORTING capability is used only for the
resulting SceneGraphPath of the collision. Only when this capability is set
the corresponding node is included in the path.
Thanks for your resonse anyway!

To illustrate my problems I attached a test application to this mail.

In this program the viewer-avatar will be represented as a color cube. The
scene graph contains another color cube which is located about 30 metres in
front of the viewer. The color cube is located below a branch-group and two
transform-groups. The class CollisionDetector will report a collision with
the viewer-avatar to the console output window. You can navigate through the
scene using the cursor keys (using the KeyNavigatorBehavior class).

What you can see with this program is that if the line
"tg2.setBoundsAutoCompute(false);" will be uncommented then there will
happen no more collision. When not included the collision will be reported.
Even though capabilities and bounds are set!

If you uncomment the line "s1.setCollidable(false);" then there is no
collision, too. Right! But having set collision bounds to the
transform-group tg2 I expected that a collision with this group will occur.
But there seem to be no collision detection within groups.

Sincerely, yours

 Michael Lorenz.
 ([EMAIL PROTECTED])



Guillermo E. Gutierrez wrote:

> Michael,
>
> It seems to me that this might be a capabilities problem rather than a
bounds
> problem.  Specifically, look at the following capabilities and make sure
they
> are getting set in the right Nodes (or Groups):
Node.ENABLE_COLLISION_REPORTING
> and Group.ALLOW_COLLISION_BOUNDS_READ.  Also, remember that a Group is a
Node,
> so you should also set:
myGroup.setCapability(Node.ENABLE_COLLISION_REPORTING)
> for your group nodes.  From my experience this can be tricky because some
> capabilities seem to be propagated to children whereas others have to be
> manually applied recursively.
>
> Hope this helps,
> Guillermo E. Gutierrez, [EMAIL PROTECTED]
> Software Enginer, Visualization Group
> Harris Corporation
>
> Michael Lorenz wrote:
>
> > Hi!
> >
> > I have a few problems using the collision detection in java 3d. I'm
trying
> > to catch collisions with my avatar (ViewerAvatar in ViewingPlatform) and
the
> > walls of a maze-like building, to prevent the avatar from running
through
> > walls. So far so good.
> >
> > I found several older mails in this group from programmers that tried to
> > make something simmilar. It would be nice if some of them can tell me
about
> > her/his progress.
> >
> > Now to my specific problems:
> >
> > * It seems that collisions with group-nodes can't be detected. Is that
> > right? If yes, what are the collision bounds in groups for?
> >
> > * In the scene-graph all of my shapes are located below several
group-nodes
> > (branch- and/or transform-groups). When I turn off the automatic
calculation
> > of the bounds in any of these groups (using setBoundsAutoCompute()) and
set
> > the corresponding bounds and collision-bounds manually (using
setBounds()
> > resp. setCollisionBounds()) then no collision with underlying shapes
happens
> > anymore. Even if I set these bounds to surround my entire scene. What
did I
> > wrong? What are the (normal) bounds for? Do group-bounds have to
surround
> > all their children? Are the bounds of a node (groups and leafs) affected
by
> > superior transform groups (sometimes this seems not to be true for
groups)?
> >
> > * Does anybody know a tutorial-like text or some sample-code that covers
> > collisions a bit more deeply than TickTockCollision?
> >
> > I'm hoping for your help.
> >
> > Sincerely, yours
> >
> >  Michael Lorenz.
> >  ([EMAIL PROTECTED])
> >
> > =====================================================================
> > To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> > Java 3D Home Page: http://java.sun.com/products/java-media/3D/
>

TestApp.java

CollisionDetector.java

Reply via email to