Skip to content

Sockets and shapes ​

Placement size, sockets, solid collision, and interaction triggers are separate settings.

Choose what to override ​

PropertyOmitted / nullEmpty array
ModelsKeep donor visualsRemove visuals
SocketsKeep donor socketsRemove sockets
BuildingCostKeep donor costFree to build
PhysicsShapesKeep donor solid geometryNo solid colliders
InteractionShapesKeep donor triggersNo overrides
An interaction's BoxesSupply an arrayRemove that target's colliders

Set a footprint ​

Add using UnityEngine; and using Ships.Interface.Model.Parts;. Put these properties in the tutorial controller's PartDefinition:

csharp
Size = new Vector3(0.5f, 0.5f, 0.5f),
Sockets = new[]
{
    new SocketDefinition
    {
        Id = 0,
        Type = CableType.Signal,
        Position = new Vector3(0, 0.07f, -0.375f),
        Rotation = Vector3.zero
    }
},
PhysicsShapes = new[]
{
    new BoxShape { Center = new Vector3(0, 0.025f, 0), Size = new Vector3(0.5f, 0.05f, 0.5f) }
},
InteractionShapes = new[]
{
    new InteractionShapeDefinition
    {
        Boxes = new[]
        {
            new BoxShape { Center = new Vector3(0, 0.25f, 0), Size = new Vector3(0.52f, 0.52f, 0.52f) }
        }
    }
}

Size sets the placement footprint. The example adds a thin solid base, a larger use trigger, and signal socket 0.

Coordinates and restrictions ​

Use part-local positions and Euler angles in degrees. Dimensions must be positive. Explicit boxes and replacement sockets do not scale with the mesh or footprint.

Preserve socket IDs/types expected by donor logic. Interaction shapes modify existing actions: omitted Target selects the sole interaction; otherwise name a unique interaction GameObject. Static physics overrides cannot replace dynamic donor colliders.

Place a fresh instance to test snapping, cable connections, collision, and use prompts. Existing placements are not moved by geometry updates.

See shape types for the complete limits.

StellarStriderLib documentation · Mods for StellarDrive