mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-23 14:00:26 +02:00
Four pieces, each adapted from RTCWQuest rather than invented. Aim. Weapon::GetMuzzlePosition derives a shot from player->m_vViewAng, which is MOHAA's analogue of rtcw g_weapon.c:1904. It now takes the controller's pitch and the yaw the hand leads the head by, added to the view yaw the game already has - the controller's absolute yaw means nothing to the game, since the player can snap turn on the stick and the play space has an arbitrary forward. Only the trace moves; the camera stays on the head. The angles reach fgame through gameImport_t rather than the usercmd, which has no spare field - angles[3] is the view direction and buttons is packed. A dedicated server answers false and keeps the aim it had. Placement. The first person model is MOHAA's FPS view model, positioned by CG_OffsetFirstPersonView against the camera and given the walk bob. Both are wrong in a headset: the hand has its own position, and shaking the view model when the camera is the player's head is a way to make people ill. It now goes where the hand is - RTCWQuest's CG_CalculateVRWeaponPosition, including dropping the origin to the feet and adding the measured head height back so the weapon hangs at the height the player is really holding it, rather than off the camera where crouching would drag it about. Selection. Nothing was bound to it at all, and there is no button left - the triggers fire, both face buttons on each hand are objectives and jump, and the sticks and grips are duck and use. The reference does not spend a button either: the dominant thumbstick up is weapprev and down is weapnext, gated on the sideways component so it cannot be read as a turn and edge triggered so a held stick does not run the inventory. This port's turn already ignores that stick's Y axis, so nothing was displaced. Two handed hold. Off hand grip squeezed with the hands close together points the weapon along the line between them instead of along the weapon hand alone - how a rifle is actually held, and steadier, because a wobble at one hand is damped by the distance to the other. Roll is halved rather than taken from the line, which carries none. The off hand grip was a duplicate of use; the weapon hand's still opens doors. The suggested binding array was 16 with 14 in use. Now 32. Aim and placement are built but not yet confirmed on the device. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>