(px, pz, elapsed, ms, bp)
| 58 | // Weight shift between feet, idle head look-around, breathing |
| 59 | |
| 60 | poseStanding(px, pz, elapsed, ms, bp) { |
| 61 | // Slow weight shift side to side |
| 62 | const weightShift = Math.sin(elapsed * 0.6) * 0.012; |
| 63 | // Idle head look around |
| 64 | const headTurn = Math.sin(elapsed * 0.3) * 0.015; |
| 65 | const headTilt = Math.cos(elapsed * 0.25) * 0.008; |
| 66 | // Slight sway from micro-balance adjustments |
| 67 | const sway = Math.sin(elapsed * 0.8) * 0.005 + weightShift; |
| 68 | // Knee bend alternation with weight shift |
| 69 | const leftKneeBend = Math.max(0, Math.sin(elapsed * 0.6)) * 0.015; |
| 70 | const rightKneeBend = Math.max(0, -Math.sin(elapsed * 0.6)) * 0.015; |
| 71 | |
| 72 | return [ |
| 73 | [px + sway + headTurn, 1.72 + bp + headTilt, pz], // 0 nose |
| 74 | [px - 0.03 + sway + headTurn, 1.74 + bp + headTilt, pz - 0.02], // 1 left eye |
| 75 | [px + 0.03 + sway + headTurn, 1.74 + bp + headTilt, pz - 0.02], // 2 right eye |
| 76 | [px - 0.07 + headTurn * 0.5, 1.72 + bp, pz], // 3 left ear |
| 77 | [px + 0.07 + headTurn * 0.5, 1.72 + bp, pz], // 4 right ear |
| 78 | [px - 0.22 + weightShift * 0.3, 1.48 + bp, pz], // 5 left shoulder |
| 79 | [px + 0.22 + weightShift * 0.3, 1.48 + bp, pz], // 6 right shoulder |
| 80 | [px - 0.24 + weightShift * 0.2, 1.18 + bp, pz + 0.02], // 7 left elbow |
| 81 | [px + 0.24 + weightShift * 0.2, 1.18 + bp, pz - 0.02], // 8 right elbow |
| 82 | [px - 0.22 + weightShift * 0.15, 0.92 + bp, pz + 0.05], // 9 left wrist |
| 83 | [px + 0.22 + weightShift * 0.15, 0.92 + bp, pz - 0.05], // 10 right wrist |
| 84 | [px - 0.11 + weightShift * 0.5, 0.98 + bp, pz], // 11 left hip |
| 85 | [px + 0.11 + weightShift * 0.5, 0.98 + bp, pz], // 12 right hip |
| 86 | [px - 0.12 + weightShift * 0.3, 0.52 + leftKneeBend, pz], // 13 left knee |
| 87 | [px + 0.12 + weightShift * 0.3, 0.52 + rightKneeBend, pz], // 14 right knee |
| 88 | [px - 0.12 + weightShift * 0.4, 0.04, pz], // 15 left ankle |
| 89 | [px + 0.12 + weightShift * 0.4, 0.04, pz], // 16 right ankle |
| 90 | ]; |
| 91 | } |
| 92 | |
| 93 | // ---- Walking ----------------------------------------------------------- |
| 94 | // Torso rotation, head bob, natural arm pendulum with elbow bend |
no outgoing calls
no test coverage detected