Skip to content

KitPart

public sealed class KitPart

Namespace Chassis.Api

One simple shape of the base interior.

public string Kind = "seat"

“seat” (cushion and backrest), “bench” (a seat across several places), “dash”, “gauges” (the hood over the dials), “wheel”, and the instrument pieces “needle”, “rocker” (a switch that tips), “button” (a round push button facing back), “stalk” (a lever pointing left) and “lamp” (a small block a lamp gauge lights).

public string Name = string.Empty

Added in 1.2.0

Name of the part’s object, so gauges, switches and other parts can find it; empty names it by kind.

Value A transform name such as “Chassis_SpeedNeedle”. The wheel is “Chassis_Wheel” unless named otherwise.

public string Parent = string.Empty

Added in 1.2.0

Name of another kit part this one hangs below and moves with, or empty for none.

Value “Chassis_Wheel” puts a horn button on the steering wheel. Position stays in the frame either way.

public Vector3 Position

Seat and bench: middle of the cushion top. Dash: middle of the top edge at the windscreen. Gauges: middle of the back bottom edge. Wheel: centre of the rim. Needle: its pivot. Rocker, lamp: its centre. Button: the middle of its back. Stalk: where it meets the column.

public Vector3 Rotation

Euler angles in the frame. A wheel’s column runs along its local forward axis.

public Vector3 Size = new Vector3(0.5f, 0.6f, 0.5f)

Seat and bench: width, backrest height, cushion depth. Dash and gauges: width, height, depth. Wheel: rim radius, -, column length. Needle: width, length, thickness. Rocker and lamp: width, height, depth. Button: radius, -, depth. Stalk: length, thickness, -.

public Color Color = new Color(0.2f, 0.2f, 0.22f)

Colour of the shape.