You can find all the spatial children of a KinematicBody node in Godot using C# code with the following steps:
GetNode
method, like this:main.cs72 chars2 lines
KinematicBody
node using a foreach
loop. You can use the GetChildCount
and GetChild
methods for this:main.cs92 chars4 lines
Spatial
node using the is
keyword:main.cs138 chars6 lines
Putting it all together, the complete code to find all the spatial children of a KinematicBody
node looks like this:
main.cs258 chars9 lines
gistlibby LogSnag