BATTLEBOX: Robot Combat Arena
README.md
editor.pick
The 3D build view's maths, all in bot space (metres, +X right, +Y up, -Z the nose):
rayPart/parts: a ray against parts as oriented boxes (bots.partstransforms), returning the nearest part, the hit point and the bot-space normal of the face it entered.floor: a ray against the stand floor.place(type, size, hit, snap): where a new part sits flush on a face and how it is turned to it (wheels axle-out on side faces, plates lying on faces, weapons facing outward).eulerFromBasis: the{pitch, yaw, roll}of a rotation given its axes, inbots.partsorder.closestOnAxis,rayPlane,segDist: projections the gizmo drags and screen-space handle picking use.
Used by editor.view.