Collision detection?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Collision detection?

David Faught
I am trying to update my DualMaze project to work with Hedgehog, and
having a difficulty or two.  I am trying to use the same collision
detection scheme that I used in Jasmine, which was to add two TRays,
one forward and one backward pointing, to the replicated avatar and
then check on the distance to any objects selected by those TRays in
the forwardOnY: method.  I had to add a check for the object type
because apparently now everything isSolid.

What happens is this.  This scheme seems to work except that after the
avatar actually "collides" with something, it loses the ability to
move forward.  It can still move backward and rotate, just not forward
no matter what direction it is facing in.  I can't seem to find what
is being changed that causes this.

I have tried to "reset" the TRay's selection after my other processing
in forwardOnY: in a similar way to the fall: method, and in that case,
the avatar doesn't even seem to see the walls at all, and just walks
right through them.

I noticed that there is now a checkMotion: hook for the current space
to modify the movement in forwardOnY:, but decided not to use that for
this approach.

Any help would be appreciated.