We need to do some cleanup on the Maze code before we release it. That
is why we aren't ready to give it out yet. I made the modifications to
the Maze to use picking for collision, so I can give you the details.
It is a common technique used in systems that don't have a explicit
collision engines. For the Maze case, we have a player that we are
trying to prevent going outside the walls. In the player movement
behavior (KeyNavigatorBehavior in this case), simply do a pick query
against your scene graph before advancing the players position. This
has the advantage that you don't move past the wall before detecting
the collision. How you respond to the collision is a bit more complicated,
and Maze did a pretty bad job in this respect.
The pick query needs to be a geometry based pick to make it realistic.
This is also why it can be slow. Maze only had the currently visible
rooms in the scene graph at the time of the pick, so the geometry set
was pruned down, but it still was a bit too slow. The PickShape to
use depends on how good you want the collision to look. For simple
cases, a single PickSegment can work.
Doug Twilleager
Java 3D Team
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
> Subject: [JAVA3D] Again: Collisions -> Can we I get the source code of Maze?
> To: [EMAIL PROTECTED]
>
> Hi,
>
> This mail is addressed at the developers of Java3D.
> At the JavaDays in Duesseldorf, I saw a presentation of Java3D by Henry
> Sowizral. He demonstrated a 3d game-prototype, which didn't use collision
> detection to prevent moving through walls, but a cheat with a matrix, which
> holds information where the user is able to walk and where not. Nice Cheat,
> but doesn't work for me!
> I talked to him after that and he said they developed a version which used
> picking to do this job, but it was too slow. Ok, collision detection in
> Java3D is slow and doesn't guarantee that collisions are detected at all!
> So I asked if he could make the source code of maze using picking available
> to the Java3d community.
> Unfortunately he said that this could be done, but first in some weeks.
>
>
> So now my question after all this prose:
>
> Is it possible to get the interesting (picking) part of the game earlier?
> or even the whole prototyp)
> I need this as quick as possible for my work on a prototyp of a virtual
> shopping mall!
>
>
> Chris Wewerka
>
> -----------------------------------------------------------
> << Very funny Scotty, now beam down my clothes >>
>
> [EMAIL PROTECTED]
>
> ===========================================================================
> 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".