Skip to reading
GDScript Programming & Godot

AttachPointsTouching()

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

Attach Points Touching

Check whether two points are touching within their radii and tolerance, and optionally store the result.

Source table from AttachPointsTouching(), page 168
Option key / fieldMeaning and inputDefault
Object / Character entityIdChoose a scene entity ID.Blank
Attach Point pointName of the source attach point.Blank
Target Object targetIdChoose a scene entity ID.Blank
Target Attach Point targetPointName of the attach point on the target entity.Blank
Contact Tolerance toleranceExtra allowed contact distance; use a nonnegative number.0.0
Store Result in Variable resultVariableName of the game variable that receives the returned value.Blank

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

Code example
await AttachPointsTouching({
    "entityId": "archive_door",
    "point": "",
    "targetId": "archive_door"
})

In use. Store hand_contact, then branch on it in a graph or script. Putting this test in a plain list does not make later instructions conditional. Use If Attach Points Touching for visible graph branches.

Page 168 of 378Permalink
Go to page