nanos world API Reference Unofficial documentation
Function Shared Slow

Vehicle:AddStaticMeshAttached

Spawns and attaches a StaticMesh to this Vehicle in a Socket with a relative location and rotation. Uses a custom ID to be used for removing/customizing it afterwards

Syntax

Lua
my_vehicle:AddStaticMeshAttached(id, static_mesh_path, socket = "", relative_location = Vector(0, 0, 0), relative_rotation = Rotator(0, 0, 0), use_parent_bounds = true, attachable_id = "")

Parameters

Name Type Default Description
id string Unique ID to assign to the StaticMesh
static_mesh_path StaticMeshPath Path to StaticMesh asset to attach
socket optional string "" Bone socket to attach to
relative_location optional Vector Vector(0, 0, 0) Relative location
relative_rotation optional Rotator Rotator(0, 0, 0) Relative rotation
use_parent_bounds optional boolean true If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together
attachable_id optional string "" Optionally attaches this to another attached static mesh (instead of attaching to the root component)