Hello Garry,

Garry Hoberg wrote:
> Am Mittwoch, 12. November 2008 00:18:54 schrieb Carsten Neumann:
>>      Hello Garry,
>>
>> Garry Hoberg wrote:
>>> I have the same problem as Telmo. The WalkNavigator "walks" me into a
>>> wall and then gets stuck (it can still turn but not "walk" any more; I
>>> only noticed actually being inside the wall after setting the near
>>> clipping plane to 0.0001 and turning 90 degrees). In my case the
>>> collision model and the drawn one are the same nodes.
>>>
>>> Large values didn't change anything. To me it seems like either the
>>> _wallDistance, _fatness and _width properites are collectively ignored or
>>> the IntersectAction's _hitT property value is set or returned falsely.
>> well, not quite, but the ray shot into the scene was aimed in the wrong
>> direction and as it turns out from the old position not the one the user
>> tries to move to (which made it impossible to just go backwards to get
>> away from a wall) -- why did I never see this when looking at the code
>> earlier, arghh
>>
> I'm confused. mv is still calculated the same, isn't it?.

right, the calculation of mv is unchanged.

> Before, the ray was 
> shot from the old position towards the new one in mv direction.

the Line constructor in use here takes a point and a vector, i.e. a 
starting point and a direction ...

> Now the ray 
> is shot from the new position towards the old one in -mv direction.

... and since that direction is now -mv, the ray points in the opposite 
direction, which is the one the user actually wants to move in ;)

> Except for a tiny speed improvement per collision test 
> [(rFrom-_rFrom).length() isn't calculated and added to _fatness+_wallDistance 
> any more] I can't see the difference. Please explain it to me.

I think I'll have to take another look at this, though. Shooting the ray 
from the new position is probably not such a good idea for the case 
where the new position is already behind a wall. I'll see what I can 
come up with a bit later today and send another patch.

        Hope it helps,
                Carsten


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to