Skip to reading
GDScript Programming & Godot

SetAttachPoint()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Set Attach Point

Create or update a named attach point with position, rotation, coordinate space, bone and contact radius.

Source table from SetAttachPoint(), page 164
Option key / fieldMeaning and inputDefault
Object / Character entityIdChoose a scene entity ID.Blank
Attach Point pointName of the source attach point.Blank
Position positionDestination/placement coordinates as [X, Y, Z].[0, 0, 0]
Rotation (degrees) rotationRotation values as a numeric array; follow the field's stated units.[0, 0, 0]
Bone Name (optional) boneExact imported skeleton bone name, if this point follows a bone.Blank
Coordinate Space spaceChoose: object, model, sprite_uv."object"
Contact Radius contactRadiusRadius used to test contact around an attach point.0.1
Enabled enabledExplicit on/off state for the feature or response.true

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await SetAttachPoint({"entityId": "archive_door", "point": "", "position": [0, 0, 0]})

In use. Define right_hand_grip on a character's hand bone. Object/model coordinates and sprite UV coordinates mean different things; choose the space deliberately. The bone name must match the imported skeleton exactly.

Page 164 of 378Permalink
Go to page