nanos world API Reference Unofficial documentation
Function Shared Slow

Vehicle:AddSkeletalMeshAttached

Spawns and attaches a SkeletalMesh to this entity, the SkeletalMesh must have the same skeleton used by this Actor's mesh, and will follow all animations from it. Uses a custom ID to be used for removing/customizing it afterwards

Syntax

Lua
my_vehicle:AddSkeletalMeshAttached(id, skeletal_mesh_path, socket = "", relative_location = Vector(0, 0, 0), relative_rotation = Rotator(0, 0, 0), use_parent_bounds = true, use_base_leader_pose_component = true, animation_path = "", attachable_id = "")

Parameters

Name Type Default Description
id string Used further for removing or applying material settings on it
skeletal_mesh_path SkeletalMeshPath Path to SkeletalMesh 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
use_base_leader_pose_component optional boolean true If true, this component will use the base leader pose component for copying its animation
animation_path optional AnimationPath "" Path to Animation asset to play on the Skeletal Mesh attached
attachable_id optional string "" Optionally attaches this to another attached skeletal mesh (instead of attaching to the root component)