Putting the Camera Inside Halo PC Vehicles with Chimera Lua
Halo PC uses a first-person camera while the player is on foot, but switches to an external camera inside vehicles. I wanted to see whether Chimera Lua could move that vehicle view into the seated player's head without changing vehicle tags or replacing Halo PC's native camera system.
The first prototype did move the camera inside the biped. It landed around the chest or feet instead of the eyes.
That bad position came from reading the skeletal node layout incorrectly. Fixing it led back to the head position I had already verified while building teammate nametags.
Reading the head position correctly
My initial calculation treated +0x78C as the beginning of the head node and then added +0x28 for its translation. That combined two different interpretations of the node layout and produced unrelated values.
For the stock cyborg biped, the head's world translation is already available at these offsets:
biped + 0x7E8 head X
biped + 0x7EC head Y
biped + 0x7F0 head Z I also compare the result with the biped centre at +0xA0. If the supposed head position is more than 1.5 world units away, the script leaves the supplied camera unchanged instead of trusting an implausible node read.
That check keeps a bad node address from throwing the camera somewhere unrelated to the player.
Keeping the override inside vehicles
The first-person mode begins with the local dynamic biped and reads its parent object identifier at +0x11C. If that identifier cannot be resolved, the player is not attached to another object and the native camera remains untouched.
The resolved parent must also report object type 1 at +0xB4, identifying it as a vehicle. The script returns the original camera while the player is on foot, dead, or outside a vehicle.
biped + 0x11C parent object id
parent + 0xB4 object type
object type 1 vehicle Unlike the separate look-back control, this camera currently applies to any occupied vehicle seat. It is an optional view mode rather than a driver-only action.
The mode is controlled explicitly:
first_person on
first_person off Tuning the eye position
Placing the camera directly on the head node left it too close to the rendered helmet. Small movements could put the view inside the visor geometry.
I moved the final camera 0.08 world units along the viewing direction and another 0.08 units upward in world space. The height was initially 0.12, but testing placed that view slightly too high, so I reduced it.
forward offset 0.08
vertical offset 0.08 The two offsets leave the camera close to the player's eyes while reducing the most obvious helmet clipping.
Replacing the third-person direction
Changing the position alone kept Halo PC's third-person vehicle-camera direction. The camera sat inside the biped, but its movement still carried the tracking and interpolation intended for an external view.
I kept two comparison modes while testing. Native mode returned the orientation supplied by Halo PC and Chimera. Aim mode read the biped's desired aim vector at +0x230.
Aim produced the better first-person view. The final script normalises that vector, uses it as the camera's forward direction, and rebuilds a perpendicular up vector while retaining the roll supplied by the vehicle camera.
biped + 0x230 desired aim vector Once that behaviour was confirmed, I removed the temporary native-versus-aim comparison mode.
The fixed-address experiment that crashed
An offsets reference identified 0x647498 + 0x1C as a vehicle-camera tracking scale. I tried writing zero there to disable the delayed turning behaviour.
The tested Halo PC executable immediately produced a segmentation fault.
I removed the write rather than treating the address as portable. The finished script does not modify camera globals; it only reads object state and returns replacement camera values through Chimera's precamera callback.
What Chimera was already doing
Reading Chimera's source explained why the supplied vehicle-camera direction retained a sweeping external movement. Chimera deliberately interpolates vehicle camera rotation before the Lua precamera callback runs.
Moving that already-interpolated camera into the biped's head preserved the motion. Reading the player's desired aim avoids changing Chimera's interpolation state and gives the internal camera a direction that follows the player directly.
Why I abandoned view limits
I also tested yaw and pitch limits relative to the vehicle. The first version behaved asymmetrically when centred on the biped orientation, then exposed angle wrapping as the underlying aim crossed 180 degrees.
The rendered clamp did not restrict Halo PC's real aim. The player could continue rotating behind the constrained camera, and changing the actual aim state risked affecting vehicle steering.
I removed the limits. The final first-person camera can rotate freely.
Checking the result
A temporary first_person debug command wrote timestamped snapshots of the head, incoming camera, final camera, desired aim, view direction, vehicle position, and vehicle orientation.
The captured sample kept the final camera roughly 0.11 world units from the head, which matched the two configured offsets. The vehicle and view vectors also remained valid during the test.
I removed the logger and debug command once the positioning and orientation were confirmed.
Working with the look-back camera
The first-person and look-back scripts both modify precamera. The original rear-view calculation rotated the entire camera position around the vehicle origin, which moved a head-positioned camera across the cabin towards the passenger side.
The look-back script now detects when the incoming camera is already near the head. In that case, it keeps the position in front of the driver's visor and rotates only the viewing frame. The stock third-person camera still follows the wider orbit around the vehicle.
The tested global-script order applies the first-person override before look-back, allowing reload to provide a rear view from either camera mode.
Where the prototype ended up
The finished script is a small, reversible camera override. It reads the stock cyborg's head position, follows the player's desired aim, and can be enabled or disabled without changing maps, tags, vehicle physics, or fixed camera globals.
It is still an override rather than a native Halo PC first-person vehicle mode. The head offsets are model-dependent, camera collision remains unresolved, and multiple precamera scripts still depend on callback order.
Within those limits, the vehicle interiors are usable from the player's viewpoint and the reload-button rear view continues to work.