Hi Loan,
do you know a address, where I can get classes, which are doing this, or
some examples?
I would be very pleased.
MB.
At 19:02 17.09.2001 +0100, you wrote:
>dear Manuel,
>
>This is something that been solved in VRML for some time, in VRML browsers
>the implementation of client navigation uses a combination of Collision
>Detection and Terrain Following. In VRML this was done in the Browser and
>not available to the VRML programmer, however it has become possible to do
>this in VRML for objects other than the avatar (since I figured it out :-) .
>As regards achieving this in Java3D, the following algorithms may prove
>helpful ;
>
>A1 Terrain Following Algorithm
>
>For each input value of projected position
> here is input.x, input.y + robot height, input.z
> there is here.x, here.y - 1000, here.z
> inverted is false
> While (true) do
> thisNode is compute rayhit between here and there
> if (hit node returned in thisNode)
> Path is hitpath returned in thisNode
> If (we hit the terrain)
> new robot position is input.x, location.y +
> robot height, input.z ,
> return new positon
> else ( we did not hit terrain ) continue ray
> if (inverted)
> reset here to location + a small Y offset
> else ( not inverted)
> set here to location - a small Y offset
> end-if
> continue while loop
> end-if
> else ( hit node not returned)
> if (not inverted)
> reset here to its initial value
> set there to its Y value + 1000
> set inverted to true
> continue while loop
> end-if
> end-if
> robot position is input value
> break out of while loop
> end-while loop
>next input value
>
>The method works by projecting a ray from the robot position directly down
>the Y axis, when the ray intersects the surface the point of contact is used
>to adjust the robot position. If projecting a ray downwards does not give a
>contact with the surface a ray is sent upwards instead. The method also
>allows for the presence of the agent in the scene. If the robot geometry is
>contacted before the surface is detected the method continues the ray trace
>beyond the robot's geometry.
>
>A2 Simple object/object collision detection algorithm
>
>For each object/object pair
> draw the smallest non oriented box
> to surround each object in the pair
> For each member of the pair
> If any vertex of this object's box is within
> The bounds of the other object's box
> Then collision is true
> End-if
> Next member
>Next pair
>
>NB : These algorithms are from my paper ANTS: Automatic Navigation of
>Terrain Systems , by Tim Batchelor currently available from the WSC6 website
>
>----- Original Message -----
>From: Manuel Braun <[EMAIL PROTECTED]>
>Sent: Sunday, September 16, 2001 2:18 PM
>Subject: 3D-Navigation
>
>
> > Hi,
> > I have trouble with Navigation.
> > I'm using the KeyNavigatorBehavior to make it able to walk around in a
>house.
> > But if i want to walk upstairs for example, I'll walk THROUGH the stairs.
> > You also can walk through walls and other objects.
> > So I'm looking for a solution for this problem.
> > Will I need to write something with Collision detecting, or how to manage
>this?
> >
> > Please help.
> >
> > Manuel Braun
> >
===========================================================================
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".