OpenSimWorld is the directory of 3D Virtual Worlds based on OpenSimulator and connected through the HyperGrid. Learn More

Vehicle couplings on Wolf Territories: trailers, caravans and trains that really hitch up.

Trailers and caravans on Wolf Territories are now joined to their vehicle by a real physics joint in the region's physics engine (ubODE and BulletSim both), not a script chasing the truck. The trailer swings, tracks round corners and is pulled like the real thing.

How it works
- The front vehicle (truck, car, locomotive) gives itself a coupler key and names its hitch points: a fifth wheel, a tow ball, a coupler hook.
- The rear (trailer, caravan, carriage) asks to attach to that key at that point. Back the truck up to the trailer and it couples once the hitch points are within reach (3 m by default).
- The coupling is saved in the object and comes back after a region restart, after editing, and across region crossings, until you detach.
- It uses your own key name, not a UUID, so it survives take and rez. Only vehicles with the same owner couple, so your key never clashes with anyone else's.

New LSL functions

wolfCouplerSetKey, wolfCouplerSetPoint, wolfCouplerRemovePoint, wolfAttach, wolfDetach, wolfAttachInfo

Joint types: WOLF_JOINT_BALL (tow ball, caravans), WOLF_JOINT_FIFTHWHEEL (articulated lorries),
WOLF_JOINT_COUPLER (railway)
Status: WOLF_ATTACH_NONE, WAITING, COUPLED, BROKEN. Pull a pair too far apart and it breaks away.

Full documentation with copy-paste examples:
https://wolf-grid.com/index.php?f=lsl

The WolfStorm web viewer's script editor already highlights the new functions and shows their tooltips.

Come and try them: truck and trailer, car and caravan, and a train running on its own railway loop are on the Sandbox region.

ypergrid: grid.wolfterritories.org:8002:Sandbox

Couplings are rolling out across the grid today; each region picks them up at its restart. These are Wolf Territories features and won't work on other grids.