BMP Gunnery
- ( Crew trainer )
- ( Hand tracking )
- ( Unity )
A VR crew trainer for the BMP infantry fighting vehicle, built in Unity for Quest with hand tracking. The gunner's station covers all three weapons: the 30mm main cannon, the coaxial 7.62mm machine gun and the ATGM. There are three positions to move between, each with its own optics: the seated cockpit, the gun sight and the missile sight.
Turret control from two tracked hands
The real vehicle has physical control handles, which you cannot ship with a headset. So we measure the vector between the gunner's hands and project it onto their forward axis: right hand further forward turns the turret left, left hand forward turns it right, which reproduces the feel of working a wheel. Hand positions are calibrated on entry to the gun sight, so the control runs relative to how that person is actually sitting and not to world space.
Raising your arms should not traverse the turret
Once hands are the input device, every unrelated movement is also a command. A vertical deadzone zeroes turret input when the hands differ in height beyond a threshold, which kills the most common false positive without making the trainee learn a mode switch.
The camera rides the gun
In gun sight mode the VR rig is reparented to the elevation transform, so the view physically moves with the barrel the way a real optical sight does, then is unparented and restored on exit. It is the difference between looking at a sight and using one.
Coming back from a sight with the trigger still held
Switching views fades to black, teleports the rig and fades back, with a guard that blocks a second switch mid-transition. The part that matters for training is that leaving a sight explicitly resets input and firing state, so a stuck fire command cannot follow the gunner back into the cockpit.
A machine gun firing ten rounds a second
Instantiating projectiles at that rate inside a VR frame budget is not viable, so each weapon pre-builds a pool of fifty rounds and cycles through it, returning each one on impact or when its lifetime runs out. Rounds use continuous collision detection and interpolation, which stops fast projectiles passing through thin targets and keeps them smooth to watch.
Rounds that land where the reticle says
Firing straight down the barrel and aiming through optics mounted somewhere else disagree at range. We compute the firing direction from the muzzle toward the sight's own ray projected a hundred metres out, so the round converges on the reticle.
An ATGM that leaves the tube like an ATGM
The missile runs a two-stage flight. First a kinematic pop-up arc shaped by an animation curve, then booster ignition with acceleration up to maximum speed and optional gravity for the ballistic path. Impact resolves as an area effect with damage falling off by distance.
Drum dials with gearing
The missile sight is aimed with two physical drums, one for pitch and one for yaw. Roughly twenty degrees of drum travel produce one degree of sight movement, which reproduces the mechanical gearing of the real instrument instead of letting the sight snap around at hand speed.
Hand rotation without gimbal lock
Wrist input is extracted using swing-twist decomposition against a reference transform, which yields an independent twist angle per axis and survives combined rotations that Euler angles mangle. An angular velocity threshold stops a stationary hand from drifting the reading.