Log inGet started
Package

wing.module

Newest version

README.md

wing

Sunfall Ridge's hang glider for glideKit: a modern kingposted delta, about 10 m span with a 128° nose angle.

  • Sail: a cambered, washed-out top surface in off-white Dacron, an orange leading-edge panel and a red pinstripe, red tip panels, eight raised batten pockets a side, a trailing edge that pulls in between the battens, a dark trailing-edge tape, and an orange double undersurface over the front 62% of the chord. The cloth takes subsurface light, so it warms and glows when the low sun is behind it.
  • Airframe: sleeved leading edges, an aluminium keel with nose plate and cone, a crossbar inside the double surface, a kingpost with upper wires (nose, tail, crossbar junctions, outboard), a control frame (A-frame) of two downtubes and a base bar with black grips, lower flying wires (nose, tail, sides), dive sticks near the tips and tip fairings.
  • Pilot: a charcoal harness pod with a teal back panel, orange piping and a reserve container, laid prone around the pilot's body, and a hang strap from the pod to the carabiner on the keel's hang point. The prone body itself is the sunfall.pilot avatar's Glide animator layer (the pilotKit/pilotProne clip), switched on by its synced Gliding parameter, which this module sets on the peer that owns the body while the wing is open.
  • Motion: the wing banks and pitches with the flight as glideKit's own did (glideKit's flight mount), unfolds along its span as it opens, and each half flexes slowly about the keel so the sail breathes. One per-frame step serves every wing in the world; it also keeps the hang strap between the pod and the keel and tidies the pod away when glideKit folds the wing.
  • Meshes and materials are built once per engine and shared by every glider.

Use

require("sunfall.wing").install()   -- once, on every peer, before a glider opens

install() registers the model with glideKit under the existing style id hangGlider (glideKit's models.register replaces a built-in), so Glider { style = "hangGlider" }, Glide.setStyle("hangGlider") and saved progression keep working, and gives that style the pose sunfallProne (glideKit's attitude only; the body pose comes from the avatar). It is safe to call more than once. Call it from a scene entrypoint or from a component's start, so it runs in every client.

The pilot reads right only on a body wearing the sunfall.pilot avatar (see sunfall.pilotLook); another body keeps its own animation under the wing.

gripPoints() gives where the base bar's grips are in the flight frame (metres from the hips: +X the left wing, +Y up, +Z the nose); PRONE is the prone turn in the body's own space.