Verify bounded ordinary-input approach to the prison gate
This commit is contained in:
@@ -93,6 +93,8 @@ class ERR_OrdinaryLookObserver
|
||||
vector view[4], body[4];
|
||||
m_Camera.GetWorldCameraTransform(view);
|
||||
m_Actor.GetTransform(body);
|
||||
// Match INPUT/GATE logical actor position; the transform supplies facing only.
|
||||
vector origin = m_Actor.GetOrigin();
|
||||
vector direction = view[2];
|
||||
vector facing = body[2];
|
||||
float viewLength = direction.Length();
|
||||
@@ -100,7 +102,7 @@ class ERR_OrdinaryLookObserver
|
||||
float right = GetGame().GetInputManager().GetActionValue("CharacterTurnRight");
|
||||
float up = GetGame().GetInputManager().GetActionValue("CharacterTurnUp");
|
||||
vector turn = Vector(right, up, 0);
|
||||
if (!FiniteVector(view[3]) || !FiniteVector(body[3]) || !FiniteVector(direction) || !FiniteVector(facing) || !FiniteVector(turn) || !(viewLength >= 0.5 && viewLength <= 2) || !(bodyLength >= 0.5 && bodyLength <= 2))
|
||||
if (!FiniteVector(view[3]) || !FiniteVector(origin) || !FiniteVector(direction) || !FiniteVector(facing) || !FiniteVector(turn) || !(viewLength >= 0.5 && viewLength <= 2) || !(bodyLength >= 0.5 && bodyLength <= 2))
|
||||
{ Cancel(index, now, "invalid-native-pose"); return; }
|
||||
direction = direction / viewLength;
|
||||
facing = facing / bodyLength;
|
||||
@@ -108,7 +110,7 @@ class ERR_OrdinaryLookObserver
|
||||
if (!Context()) { Cancel(index, now, "native-camera-or-player-context-lost"); return; }
|
||||
if (m_Index == 0)
|
||||
PrintFormat("ERR LOOK OBSERVE: run=%1 sample=%2 real=%3 BASIS native-player-camera-world-transform", m_Nonce, index, now);
|
||||
PrintFormat("ERR LOOK OBSERVE: run=%1 sample=%2 real=%3 SAMPLE direction=%4 camera=%5 body=%6 bodyForward=%7 turn=%8", m_Nonce, index, now, direction, view[3], body[3], facing, turn);
|
||||
PrintFormat("ERR LOOK OBSERVE: run=%1 sample=%2 real=%3 SAMPLE direction=%4 camera=%5 body=%6 bodyForward=%7 turn=%8", m_Nonce, index, now, direction, view[3], origin, facing, turn);
|
||||
m_Index = index; m_Previous = now;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user