Log inGet started
World

BATTLEBOX: Robot Combat Arena

Branchmain
Commit7fbeff3a68

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.parts transforms), 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, in bots.parts order.
  • closestOnAxis, rayPlane, segDist: projections the gizmo drags and screen-space handle picking use.

Used by editor.view.