View Issue Details

IDProjectCategoryView StatusLast Update
0006259The Dark ModCodingpublic03.12.2023 22:51
ReporterDaft Mugi Assigned ToSTiFU  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.11 
Target VersionTDM 2.12Fixed in VersionTDM 2.12 
Summary0006259: Player falls through moving platform on shouldering animation
DescriptionWhen the player is on a upwards-moving platform, such as an elevator or lift, and shoulders a body,
the player will clip through the platform and fall below it during the shouldering animation.

Two missions to try are "Volta 2" and "New Job".

Volta 2: setviewpos -1798.6 3571.72 -1883.75
New Job: setviewpos 1222.88 -204.17 -81.75
Steps To Reproduce1. Put a body on a platform.
2. Push button to make the platform rise.
3. While it's rising, shoulder the body.
4. (The player clips through the platform and falls.)
TagsNo tags attached.

Activities

Daft Mugi

Daft Mugi

16.02.2023 06:02

developer   ~0015946

Daft Mugi

Daft Mugi

18.02.2023 04:21

developer   ~0015953

I tracked this down to "idPhysics_Player::ShoulderingMove()".
Within that function, the animation doesn't factor in a moving platform.
With each "SetOrigin()" call, the player starts to clip through the platform.
With the final "SetOrigin()", the player's origin gets set to the start of the animation.
The player and platform become mismatched.

See:
    // Apply animation to player position and view angle
    const idVec3 newPosition = current.origin + (newPositionOffset - m_PrevShoulderingPosOffset);
    m_PrevShoulderingPosOffset = newPositionOffset;
    SetOrigin(newPosition);
And:
    // Explicitly return to start position to avoid clipping due to quantization errors
    SetOrigin(m_ShoulderingStartPos);
Daft Mugi

Daft Mugi

23.11.2023 20:50

developer   ~0016184

STiFU, it looks like you have time at the moment for writing code.
Would you mind taking a look at this?
STiFU

STiFU

24.11.2023 18:02

developer   ~0016185

Right now, I want to focus on the "frob to use world item" extension, as that is important to me. Once that is complete, I can probably have a look at this.

Anyway, the fix to this bug is to shoot a trace along the gravity axis to find the entity we are standing on and then design the animation relative to the position of that entity like it has been done with mantling (m_p_mantledEntity).
STiFU

STiFU

02.12.2023 19:17

developer   ~0016201

At revision: 10527
Daft Mugi

Daft Mugi

03.12.2023 22:51

developer   ~0016205

I tested the fix. It seems to be working well. Thank you!

Issue History

Date Modified Username Field Change
16.02.2023 06:01 Daft Mugi New Issue
16.02.2023 06:02 Daft Mugi Note Added: 0015946
16.02.2023 06:02 Daft Mugi File Added: cauldron_v2_2_4303d8b3bf4bea95 (2023-02-15 23-26-19) (-1798.6 3571.72 -1883.75) edited.jpg
16.02.2023 06:02 Daft Mugi File Added: newjob (2023-02-15 23-24-02) (1222.88 -204.17 -81.75) edited.jpg
18.02.2023 04:21 Daft Mugi Note Added: 0015953
30.10.2023 23:23 Daft Mugi Target Version => TDM 2.12
23.11.2023 20:47 Daft Mugi Assigned To => STiFU
23.11.2023 20:47 Daft Mugi Status new => assigned
23.11.2023 20:50 Daft Mugi Note Added: 0016184
24.11.2023 18:02 STiFU Note Added: 0016185
02.12.2023 19:17 STiFU Status assigned => resolved
02.12.2023 19:17 STiFU Resolution open => fixed
02.12.2023 19:17 STiFU Fixed in Version => TDM 2.12
02.12.2023 19:17 STiFU Note Added: 0016201
03.12.2023 22:51 Daft Mugi Note Added: 0016205