Fixing rider position on FiveM motorcycles

Floating hands, feet through the floorboards or no passenger seat on a FiveM bike? How layouts, seat bones and hbgrip offsets fix the rider.

Hands floating above the grips or buried in them, feet hovering over the floorboards, a passenger sitting inside the backrest, or no passenger seat at all. On add-on bikes the model is rarely the problem. A few bones in the .yft and one line in vehicles.meta decide where the rider goes, and you can fix nearly all of it without touching animations.

This is about bikes that load but look wrong with a rider on them. For getting a bike running in the first place, use the install guide.

What places the rider

There's no stored rider pose. The game plays the seated animation from the layout, then IK pulls hands and feet towards bones on the bike. Four things matter:

  • Layout in vehicles.meta, e.g. <layout>LAYOUT_BIKE_FREEWAY</layout>. It picks the posture: cruiser lean-back, sport tuck, dirt bike stance.
  • Seat bones seat_f (rider) and seat_r (passenger). The pelvis goes here.
  • Grip bones hbgrip_l and hbgrip_r, children of handlebars. The hands go here.
  • handlebars, the bone the game rotates when you steer.

One of these missing, misplaced or parented wrong and the rider breaks, no matter how good the mesh looks.

Pick the layout first

Match the layout to how the bike is ridden before moving any bone. A sport layout on a long cruiser leans the rider into the tank; a cruiser layout on a sport bike sits them upright with arms stretched out. Bone tweaks won't fix a posture meant for a different bike.

Bike typeLayoutVanilla reference
Bagger / tourer with floorboardsLAYOUT_BIKE_FREEWAYWestern Bagger
SportLAYOUT_BIKE_SPORTDinka Akuma (Bati 801 uses LAYOUT_BIKE_SPORT_BATI)
ChopperLAYOUT_BIKE_CHOPPERWestern Daemon, Zombie Chopper
Dirt bikeLAYOUT_BIKE_DIRTMaibatsu Sanchez

The vanilla bike on the same layout is what you measure against in the next steps.

Hands floating or inside the grips

Most people put hbgrip_l and hbgrip_r on the centre of the bar tube. The IK target is closer to where the palm sits, so on the tube centre the fingers end up inside the grip.

We measured instead of guessing. On the Western Bagger the grip bones sit about 3 cm forward and 1.6 cm above the grip axis. Relative to seat_f the Bagger's grip bone is roughly at x 0.372, y 0.619, z 0.275 (metres), grip radius about 1.9 cm.

Measuring your own reference

  1. Export the vanilla bike for your layout (e.g. bagger.yft and bagger_hi.yft) to XML with CodeWalker and import it with Sollumz.
  2. Note the world positions of seat_f, hbgrip_l, hbgrip_r and the grip tube.
  3. Keep the same offset from the grip axis on your bike and a similar grip-to-seat distance. If your bars are much wider or taller, move the bars, not only the bones.
  4. Make sure both grip bones are children of handlebars. Parented to chassis, the hands stay still while the bars turn.
Compare in a clean scene. Two versions of the same bike imported into one Blender session can share materials and data by name and look identical. Use a fresh scene or read positions straight from the XML.

Feet floating or clipping

Feet follow the animation, not a bone. You fix them by moving the floorboards or pegs, or seat_f, again against the vanilla bike on the same layout:

  • Note how far below and in front of seat_f the vanilla footrest is.
  • Put yours at the same offset.
  • Legs too bent or too straight means the seat height is wrong for the layout. Move seat_f and the seat mesh together.

Common one on baggers: floorboards modelled at a steep angle because it looks better. The animation expects a fairly flat board and the heel goes through. Flatten it or rotate it as one piece; don't stretch the mesh.

Passenger seat missing or clipping

  1. Bone. No seat_r in the .yft, no seat.
  2. Layout. The layout needs a passenger seat. With a custom layout in vehiclelayouts.meta, check the seat list and that it's loaded with data_file 'VEHICLE_LAYOUTS_FILE'.
  3. Clearance. Passenger through the backrest, sissy bar or top case: move seat_r forward a few centimetres or move the backrest. On one build we moved it from -1.56 to -1.43 before the back stopped going through the pad.

Testing in game

IK only runs in game, so Blender won't show these problems. When we test a bike we:

  • get on and off from both sides, since enter and exit use the seat bones too;
  • steer full lock both ways while stopped; a hand leaving the grip means the grip bone isn't following handlebars;
  • check first person, where floating hands are obvious;
  • try a passenger with a bigger ped model.

Bike flipping on its own or not letting anyone on? See troubleshooting. Our Western Gladius chopper was set up this way, with grip offsets taken from the vanilla Bagger.

More articles

Still stuck?Open a ticket on Discord with your resource name, framework and a screenshot of the server console.
Get help