Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Adding child nodes to terraine nodes on ARSCNView

Open
#46 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
ios, swift

Research direction

Start at the ARSCNView setup and the button callback that creates the SCNSphere, then inspect how the scene rootNode, terrainNode.convertPosition, camera, and node transforms are configured. The issue is resolved when a red sphere added to the scene is visibly rendered and its child-node count still updates as expected.

Written by the indexing model from the issue text.

Description

I have tried a good few different combinations but once I'm on ARSCNView I can't seem to add any child nodes. Even If I don't use terrainNode.convertPosition and just try to add a child to the root node, nothing shows.

The child is being added as if I check the count of arView?.scene.rootNode.childNodes it is increasing every time I add a child node but visually I see nothing.

I am adding them like this with a button once everything loaded:

`
let endSphere = SCNNode(geometry: SCNSphere(radius: 100.0))
endSphere.geometry?.firstMaterial?.diffuse.contents = UIColor.red
endSphere.position = (arView?.scene.rootNode.position)!

    arView?.scene.rootNode.addChildNode(endSphere)
    
    print(arView?.scene.rootNode.childNodes.count)`
Dominant language
Swift
Stars
232
Forks
51
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-scenekit

All issues in mapbox/mapbox-scenekit

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.