#148: Mover fails to detect that its move is blocked by player entity

1 view
Skip to first unread message

Cafu Trac

unread,
Apr 22, 2015, 4:08:24 PM4/22/15
to cafu...@googlegroups.com
#148: Mover fails to detect that its move is blocked by player entity
-------------------------+----------------------
Reporter: Carsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Cafu Engine | Version: svn-head
Keywords: | Platform:
-------------------------+----------------------
In map Kidney, if the player stands in the frame of the open door (in the
attached screenshot at the very right, close to the wall near the blue
light) so that it blocks the door's lower half and thus prevents it from
closing, the door actually fails to detect that it is blocked: it closes
anyway, causing the player to get stuck (until it re-opens).

This only happens if the player stands on the floor at the very right. If
the player stands further left on the part of the door that sticks out,
the problem does not occur.

--
Ticket URL: <http://trac.cafu.de/ticket/148>
Cafu 3D Game and Graphics Engine <http://www.cafu.de>
The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action.

Cafu Trac

unread,
Apr 22, 2015, 4:26:34 PM4/22/15
to cafu...@googlegroups.com
#148: Mover fails to detect that its move is blocked by player entity
--------------------------+----------------------
Reporter: Carsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Cafu Engine | Version: svn-head
Resolution: | Keywords:
Platform: |
--------------------------+----------------------

Comment (by Carsten):

It turns out that this problem begins in function `GetEntityPosCat()` in
`GameSys/CompMover.cpp`, which calls `ClipWorldT::TraceConvexSolid()`.

This method first examines the world's collision model, determines
(correctly) that the player is standing on the floor, and yields a
resulting `Fraction` of 0.0 (while being clear of any solids). It then
uses the 0.0 fraction as an argument to stop early, that is, to not bother
examining the collision models of any other entities such as the door's
lower half. This is wrong, because this causes the method to miss the fact
that the player is actually ''stuck'' in the door's lower half. This
failure propagates upwards, causing the described problem.

--
Ticket URL: <http://trac.cafu.de/ticket/148#comment:1>

Cafu Trac

unread,
Apr 24, 2015, 5:39:03 AM4/24/15
to cafu...@googlegroups.com
#148: Mover fails to detect that its move is blocked by player entity
--------------------------+---------------------------------------------
Reporter: Carsten | Owner: Carsten Fuchs <carsten.fuchs@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Cafu Engine | Version: svn-head
Resolution: fixed | Keywords:
Platform: |
--------------------------+---------------------------------------------
Changes (by Carsten Fuchs <carsten.fuchs@…>):

* owner: => Carsten Fuchs <carsten.fuchs@…>
* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"9d7bc31866c9f5419a57209b7b7f62d6cd476849/git"]:
{{{
#!CommitTicketReference repository="git"
revision="9d7bc31866c9f5419a57209b7b7f62d6cd476849"
ClipSys: In `TraceResultT`, clarify that `Fraction == 0.0` is still
different from `StartSolid == true`.

The code formerly assumed that `Fraction == 0.0` and `StartSolid == true`
were
equivalent. However, as described in #148, this possibly caused us to miss
and
thus fail to report actual starts in solid if a previous trace already
yielded
a "legit" fraction of 0.0 (without being stuck in solid at this time).

Fixes #148.
}}}

--
Ticket URL: <http://trac.cafu.de/ticket/148#comment:2>
Reply all
Reply to author
Forward
0 new messages