Rideable motorcycles and trucks. What This Module Does
The rider on a vehicle: hips on the seat point, hands on the grips, feet on the rests, the arms following the bars.
Classes & Namespaces
Design Notes from the Source Code
The rider on a vehicle: hips on the seat point, hands on the grips, feet on the rests, the arms following the bars.
A vehicle model says where its rider touches it (model.json › vehicle:
a seat point, a grip per hand, a rest per foot, each riding a part). This
file holds a humanoid model to those points:
board once: the joints by rig name, the limbs measured at the rest pose, the forward lean the arms need (the torso turns at the hips), every scratch object. seat each drawn frame, inside the placement: the rider's world transform is the vehicle's whole attitude with the Hips joint over the seat point. The rider is never a child of the vehicle. update each drawn frame, after both models were animated: a closed-form two-bone reach per limb, the chest and the head. It is worked out only when what it depends on changed; otherwise the joint turns stored last time are written again. Under a motion that holds still (the Ride stance) it is worked out at five angles of the bars once, and steering blends between those: once with both feet up, once more for a stop with the foot down. At a stop the stand-side foot goes to the ground read at its own place. fit the same arithmetic with no game: what the checker, the script tools and the Vehicles page print and fit a size with.
Every joint is written through a slot (base what the motion gave, out
what was written), so the pose lies over the motion and never winds up.
Nothing is created after board.
Frames. A rider's own frame is x to its left, y up, z ahead (the rig's
convention). A vehicle's model space is the model centered on x and z,
standing on y = 0, in the file's units; its front is the block's forward.
View reactor_3d_rider.js on GitHub · Hide internal (_) functions