Function
Slow
Cable:AttachEndTo
Attaches the end of this cable to another Actor at a specific bone or relative location. For optimization, it is recommended to be the last method to call when setting up the cable.<br/><br/>Note¹: You can attach the end only, and the start will fixed at the Cable's location.<br/><br/>Note²: If no linear limit is set, the entity will be snapped to the other actor. Alternatively you can keep a physics constraint offset by passing it as parameter.
Syntax
my_cable:AttachEndTo(other, relative_location = Vector(0, 0, 0), bone_name = "", constraint_offset = Vector(0, 0, 0))
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
other
|
Actor | — | — |
relative_location
optional
|
Vector | Vector(0, 0, 0) |
— |
bone_name
optional
|
string | "" |
Which bone to attach to. If empty it will be attached to the Actor, otherwise to the Mesh at the bone/socket |
constraint_offset
optional
|
Vector | Vector(0, 0, 0) |
The physics constraint offset applied to the attached end, in the local space of the other Actor |
Returns
-
boolean
attached_successfullyif it was attached successfully