Seated in a level's opening cinematic (a passenger), the right controller
turned the game's camera the flat screen shows. The scripted-camera rule
went back out: the main menu is a scripted camera and was immersive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A scripted camera outside a cinematic (a level's intro) was drawn in
stereo from the head, with the weapon at the controllers in it; it now
goes to the screen like a cinematic. Under the system menu the headset
reports no hands and the weapon fell back to the head; the hands last
seen in focus stand in meanwhile, their buttons let go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sprites, light volumes (a plasma bolt's glow) and lens flare tests are
projected on the CPU into screen pixels with w 1 and their depth in z, and
the widgets' vertex program takes them to clip space: taken for a point
1 world unit away, a bolt 30 away stood 3 m off in stereo and seemed to be
swallowed half way. Where w is 1 and depth is tested, the depth comes from
z by the shared camera's projection (mv_depth), and the eye's offset is by
it. (Also logs, once each, the other targets the pass draws into.)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sky is drawn about the camera (its view has no position), so no eye
stands aside of it; the eye's offset made it a dome a few metres away,
flat and swimming (the sea in 'Halo' is the sky's). Its draws take rows
without the offset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With GL_OVR_multiview2 (vr.multiview), the scene is drawn once, from a
camera between the eyes whose view takes in both (plus a margin), into a
two-layer back buffer: every NV2A vertex program gets a two-view variant
that moves each view's clip position to its eye (x' = a x + b w + c, from
the shared view's and the eye's edges and the eye's place; nv2a_vsh.c),
screen-space geometry excepted. Sampling the back buffer meanwhile reads
the left eye's picture; visibility counts are halved. The host copies each
layer to its eye's image (host_xr_copy_layer_array).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game steers a vehicle gun's shots (within its deviation cone) at what
the camera aims at; VR had replaced that camera with the barrel's own
line, right on foot but not seated, where a Banshee's nose rises as it
hovers and a tank's turret lags: the Banshee's crosshair rode high. Seated,
the camera is now the player's eyes and the unit's aim (the stick's steer,
the controller at a gun), and the crosshair floats on that line; the
barrel-line crosshair is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
debug.vehicle_spawn: holding both thumbsticks in for 1.5 s puts the next
vehicle the map has loaded (not the Pelican, dropship or lifepod) a few
metres ahead of the player, cycling through them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A vehicle's gun, once manned, fires along its own barrel (not the aiming
vector) from its primary trigger, moved onto the vehicle's camera line if
it fires from its camera. The crosshair ran from the right hand along the
controller instead, and the Scorpion's shells landed above and behind it.
It now floats on the gun's own line (weapon_vr_manned_gun_line), as the
turret actually points.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The collision model's top lifted the Scorpion's driver onto the turret as
it swung over him (screenshots); it never caught anything the set heights
did not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Like the Ghost's: the driver sits down in the hull (screenshot: the
compartment's inside). The raise applies to a vehicle's driver and gunner
only; riders on a tank's back sit on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Their collision models leave out what hid the view (screenshots: the
Ghost's hood arches over the rider's eyes, the Shade's shield sits at
them). The eyes now rise by a set height per kind of hull
(vr.ghost_eye_raise, vr.banshee_eye_raise, vr.turret_eye_raise), and at
least over the collision model's top.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Their rider bends down into the vehicle, and the eyes at his head looked
into his own shoulders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Their riders sit down in the hull, drawn from behind in the game; from the
rider's head the view met its inside. The eyes now rise to above the hull's
top over the head and up to 50 cm ahead of it (a downward ray against the
vehicle's own collision model), plus vr.enclosed_seat_clearance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seated as a driver or gunner, the player's body is drawn (its hands on
the wheel or the gun's handles, as the seat animates them), its head
shrunk to nothing out of the eyes' way. A gunner's view is moved back from
the gun's sights (vr.gunner_camera_back). Glass tints and reflects half as
much (vr.glass_strength), which up close hid the view through the
Warthog's windscreen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seated, the first-person camera stood where the seat's chase camera turns
about (the vehicle's middle, low); it is now at the rider's head marker.
X now does what the game's prompts say it does (action, reload); B takes
the flashlight (tap) and grenade switch (hold).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seated, the view stays behind the player's own eyes (vr.vehicle_first_person)
and turns with the vehicle, smoothly between ticks (its interpolated
heading); the head looks around freely, and recentring faces the vehicle's
forward. A driver who steers by facing (jeep, boat, plane, scout, fighter)
steers with the right stick: aside up to vr.vehicle_steer_degrees off the
heading, up and down for pitch (vr.vehicle_pitch_degrees). Gunners, the
tank's driver and passengers aim with the right controller, and turn in
the seat with the stick. The crosshair and its distance follow the
vehicle's aim. While the vehicle turns the player, the eye images darken
from their edges (vr.comfort_vignette, host_xr_set_vignette).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hands are drawn over the world, so they hid the grenade wherever they
overlapped it, and turning the palm up showed it behind the hand. It is now
drawn in the first-person pass with them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The held grenade is drawn in front of the left palm (vr.grenade_right,
_forward, _up from the grip) at 0.55 of its size (vr.grenade_scale).
A hand-thrown grenade is no longer brought up to the projectile's final
velocity, which made every throw as far; strength now runs from 0.25 to
full at 5 m/s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first-person view leaves out the player's body and what hangs from it,
the grenade in hand too. While the left trigger holds it, it is drawn at
the left controller each frame. Logs the grenade's hold and release for
testing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The left trigger holds the grenade in the hand (the game keeps it there
past the throw animation); letting go throws it from the left hand, along
the fastest the hand moved over its last 150 ms, as hard as that was (full
at 4 m/s). Without a throw (vr.grenade_throw_speed, 1.5 m/s) the game
throws as before. The left hand's swing is no melee while throwing, and
the arms keep their pose through the throw animation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Halo draws its centre prompts as crosshair elements of the weapon HUD.
Only the reticle states now go to the crosshair layer; the message states
are drawn in the head-locked HUD, also while zoomed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The crosshair used to be cut out of the HUD image (an 80x80 region around
the centre) and moved to where the weapon aims, taking with it whatever
else lay there, such as part of the reload prompt. Now it is drawn alone
first (hud_draw_crosshair), captured into its layer, and the HUD is drawn
afterwards without it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shots started at an offset from the unit's eye point (its sight
position), the crosshair at the same offset from the drawn camera; the two
need not agree, and the shots ran parallel to the crosshair's line, a few
centimetres higher (plain on the pistol's small crosshair). Both now start
at the same point in the world, the drawn weapon's muzzle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The projectile aim assist traces from the camera along the aim and turns
the shot, fired from the weapon, towards what that ray hits; in VR the
eyes' line runs parallel to the weapon's but higher, and shots landed
above the crosshair. For a VR player it traces and seeks targets from the
muzzle along the weapon's own line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The weapon's frames are derived in one place: the controller's, the
model's (turned so its barrel points where the controller does), and,
with both hands on it, both turned alike by the turn that lines the
model's grips up with the hands, measured in the model's frame (it was
applied in the controller's, which tipped the aim up when gripping).
- The crosshair runs along that aim from the muzzle, as the shots do.
- The scope keeps its place above and ahead of the hand, moved only
sideways over the barrel as drawn, facing back along the aim.
- Each weapon's barrel angle and gun node offset go to debug.txt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
First-person models point their barrels in towards the screen's centre,
so the model pointed a few degrees left of where the controller aims and
shots, the crosshair and the scope went. The weapon camera is now turned
by the barrel's direction at the ready (the gun node's axis nearest the
camera's forward), which is logged per weapon, and the scope's disc sits
over the barrel as drawn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each weapon's first-person model sits differently in the hand, and the
pistol's barrel ran a few centimetres left of the controller's aim, so its
crosshair sat right of it. Shots, the crosshair and the laser now start at
the gun node as drawn at the ready, along the controller's aim.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The weapon's own crosshair (red on an enemy, as in the HUD) is taken
from the HUD's centre and floats where the weapon aims, as far away as
what it aims at, facing the eyes, as large as the HUD showed it
(vr.crosshair). The laser is off by default (vr.laser) and never shows
over the menus.
- Zoomed in, the first-person weapon stays in the hand (the game hides
it), the HUD's crosshair and zoom overlays give way to the scope, which
has a fine cross of its own, and the scope's disc is 10 cm across.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Zoomed in, the player's view is drawn once more, from the weapon along
its aim through the zoom's field of view, into a small square of the
back buffer (the first-person weapon left out), and shown on a disc over
the barrel that magnifies what it covers of the view by the zoom's
magnification (vr.scope_size). The weapon's zoom mask and filters no
longer darken the HUD before the eyes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The part of the HUD moved to the wrist is now just around the motion
tracker's disc and its range (measured in a 640-wide HUD), larger on the
wrist and without what else the corner holds.
- The terminal's log lines, which the beta prints over the bottom left
of the screen, are left out in VR; the console, when open, still shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While an animation turns the weapon away from where it aims (reloads,
drawing and putting it away, posing, venting), the laser follows the gun
node's turn from its ready pose. The ready pose is now kept only while
the weapon is held ready or firing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The melee animation moves both hands about the gun (the right one to the
stock, the left one onto the barrel) and the left arm with them; holding
only the gun still showed that. The whole skeleton now keeps its pose
from before the attack, in the hand. The melee diagnostics are gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game scales a player's melee damage by the forward run (the lunge),
and a VR player punches standing: blows hit but did next to nothing. The
swing's speed now weighs the blow (half at 2 m/s, full at 4; three
quarters on the right grip), unless the run gives more. Melee attacks and
what they hit are logged in debug.txt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The free left arm keeps its shape on the foregrip, which left its upper
arm pointing anywhere (at the belly, looking down); it now turns about the
elbow to point back at the shoulder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bent to the shoulder, the free left arm's skin, bound partly to the
skeleton's root at the other hand, tore into ribbons wherever the hand
was far from where the animation has it. The whole arm now follows the
hand as it is shaped on the foregrip; the shoulder IK is kept for the
right arm and the left one on the weapon.
- A melee attack aims where the head looks (the right controller aims
the weapon), and each one is logged; vr.melee_swing_speed is 1.5 m/s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The forearm, turned only to point at the wrist, kept the animation's
twist while the free hand could roll half a turn from it, and the skin
between them collapsed into a ribbon. It now takes most of the hand's roll
about its bone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The free left hand lines up with the controller as a hand holds it:
fingers along it, the knuckles (little finger to index) up its handle,
the wrist behind its grip.
- Thrusting a hand forward (vr.melee_swing_speed) is a melee attack; the
right grip still is too.
- Through a melee attack the gun stays in the hand; its animation would
swing it before the camera.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The first-person arms' upper arms and forearms are turned (two-bone
IK) to run from the player's shoulders, below the head, to the wrists,
instead of floating with the weapon.
- The left wrist follows the left controller, its fingers with it,
unless the grip closes at the weapon's foregrip (vr.two_hand_reach):
then the hand holds the weapon, which aims along both hands.
- Left controller: grip holds the weapon, Y switches weapons, X is the
flashlight, and held switches grenades.
- The first-person skeleton's nodes are logged once per weapon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SDL 3.4 holds an audio stream's lock through its callback, and the
game's data was put into the stream from the thread that runs the
game's callback, which then waited for that lock for ever: the first
callback never returned and nothing was heard. The data is now
gathered and put in by SDL's own thread once the game is done.
- debug.audio_log logs the level of the mixed sound.
- In VR a player's unit sees what its head points at within 15 degrees,
or what the weapon's laser points at, since the head only points
roughly where the eyes look (the training's flashing lights ask for
5 degrees).
- vr.log_performance also logs the unit's looking vector.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scripts test where the player looks (unit_can_see_point, the unit's
looking vector), and the head only set it while the game let the player
turn; the training's "target each of the flashing lights" never passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The training at the start of the campaign waits for the look input
(player_control.c's action tests, from facing_delta), which the head
never produced. The view's turning since the last test counts too, once
past a few degrees.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With vr.aim_with = "controller" (the default), on foot:
- the unit's aiming vector comes from the right controller, while its
facing (the body, the view and the movement) keeps following the head;
- shots start at the muzzle of the weapon in the hand, kept inside the
level from the camera as before;
- the first-person weapon and hands are posed from the controller
(vr.weapon_forward/right/down place the model in the hand);
- the HUD's crosshair, which marks where the head looks, is left out, and
a laser runs from the weapon to what it aims at (vr.laser).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>