Object interaction summary

← Back to docs · Architecture · Viewer compatibility

Status: complete (24 of 24 tasks, 3 phases). Change: openspec/changes/object-interaction/.

What was built

All object manipulation UDP packet handlers required for the viewer's build tools and object inspector. Without these, users could not select, move, rotate, scale, link, copy, rez, or derez objects. The work ported logic from OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs, SceneObjectPart.cs, LLClientView.cs, and InventoryAccessModule.cs.

PhaseAreaTasks
1Core editing: MultipleObjectUpdate, select/deselect, properties, broadcast1-7
2Manipulation: grab/touch, name, description, shape, permissions, sale, owner8-18
3Rez, derez, linking, duplication19-24

Architecture

Every object mutation follows the same path:

  1. Decode the incoming UDP packet per the message template
  2. Look up the target SceneObjectPart by local ID in the scene graph
  3. Check permissions via PermissionsModule (CanEditObject, CanMoveObject, etc.)
  4. Apply the mutation to the SceneObjectPart and SceneObjectGroup
  5. Broadcast the change to all connected viewers

Two broadcast modes exist. ObjectUpdate sends full object data when an object first appears or its properties change. ImprovedTerseObjectUpdate sends only transform and velocity data for position/rotation/scale changes during editing. The terse form is much smaller and used for high-frequency updates.

HandlerPurpose
MultipleObjectUpdatePosition, rotation, scale via flags byte (0x01/0x02/0x04/0x08)
ObjectSelect, ObjectDeselectSelection tracking, sends ObjectProperties on select
ObjectGrab, ObjectGrabUpdate, ObjectDeGrabTouch events with UV coordinates and face index
ObjectName, ObjectDescriptionString property editing
ObjectShapeAll prim shape parameters (ProfileCurve, PathCurve, etc.)
ObjectPermissionsBase, owner, group, everyone, next-owner permission masks
ObjectSaleInfoSale type and price
ObjectExtraParamsFlexible, light, sculpt, projection, mesh parameters
ObjectGroup, ObjectOwnerGroup ownership and ownership transfer
RequestObjectPropertiesFamilyFull property response to requesting viewer
ObjectPropertiesRequestBatch properties response for multiple objects
RezObjectInstantiate from inventory: fetch item, deserialize, place, broadcast
DeRezObjectSix destination codes: save, take, take-copy, god-copy, delete, return
ObjectLink, ObjectDelinkCombine or split prims in link sets (54m distance limit)
ObjectDuplicate, ObjectDuplicateOnRayCopy at offset or along camera ray cast

Key decisions

  1. All permission checks go through PermissionsModule. No inline permission logic in packet handlers.
  2. ObjectUpdate broadcast is queued and batched per viewer tick to prevent packet storms during multi-select edits.
  3. MultipleObjectUpdate quaternion decoding follows OpenSim's exact format (3-component normalized, not 4-component).
  4. DeRezObject destination codes are copied from OpenSim's DeRezAction enum.

Commits

HashDescription
8da4f35Phase 1: MultipleObjectUpdate, select, properties, terse broadcast
1fe25abPhase 2: grab, name, shape, permissions, sale, owner handlers
eb634b0Phase 3: RezObject, DeRezObject, link, delink, duplicate handlers