'ARKit and Reality Composer scaling nodes
I'm trying to create a node in xcode that will combine 2 of my models that I'm fetching from RC Scene.
myTrack
myCar
they both been aligned individually but they are a bit too big. Car is using a loop that is controlling it movement around the track using JSON.
I want to add them to one root node and mange scale from there using
let mainAnchor = AnchorEntity(world: [0, 0, 0])
self.arView.scene.addAnchor(mainAnchor)
myTrackTransformed.addChild(mainAnchor)
myCar.addChild(mainAnchor)
mainAnchor.scale = [0.1, 0.1, 0.1]
but whatever I put in scale values they do nothing. Any ideas why?
Solution 1:[1]
The anchor must be a parent node, not vice versa:
let mainAnchor = AnchorEntity()
mainAnchor.addChild(myTrack)
mainAnchor.addChild(myCar)
self.arView.scene.addAnchor(mainAnchor)
mainAnchor.scale /= 10
But remember that you need to extract the model entities (myTrack and myCar) from the Reality Composer scene (RCScene.rcproject).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
