ios – The best way to have higher collision shapes on USDZ objects in RealityKit?

[ad_1]

That is how my .USDZ object appears to be like like and it is collision form:

This is how my .USDZ object looks like and it's hitboxes.

It principally simply creates rectangles, and typically these collision shapes overlap one another which makes it arduous to faucet on them. How can I create rounded collision shapes or collision shapes that truly match the thing?

That is how i load my .USDZ recordsdata:

let entity = strive! Entity.load(named: "Arm")
entity.generateCollisionShapes(recursive: true)
    
let modelEntity = ModelEntity()
modelEntity.addChild(entity)
modelEntity.generateCollisionShapes(recursive: true)
    
let anchorEntity = AnchorEntity(airplane: .horizontal)
anchorEntity.addChild(modelEntity)
    
arView.installGestures([.all],for: modelEntity)
    
arView.scene.addAnchor(anchorEntity)

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *