与多个模型实体交互

Interact with several ModelEntities

有没有一种简单的方法可以同时与 RealityKit 中的多个 ModelEntities 进行交互?例如,使用一个多点触控手势旋转两个 ModelEntities。

当然可以。只需为两个或更多 children.

创建一个 parent 实体
let parentEntity = Entity()
parentEntity.addChild(childEntity01)
parentEntity.addChild(childEntity02)
    
arView.installGestures([.all], for: parentEntity as! Entity & HasCollision)