Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 658 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 658 Bytes

BillboardEntity

An entity abstraction that acts as a billboard for RealityKit. This works by maintaining a reference to the ARView and using the cameraTransform property to orientate the entity toward the camera.

Example

// Create a billboard entity that will look at the camera of an ARView
let billboard = BillboardEntity(orientatedTo: arView)

// For the entity you want to face the camera, add it to the billboard entity
let box = MeshResource.generateBox(size: [1, 1, 1])
let boxEntity = ModelEntity(mesh: box)
billboard.addChild(boxEntity)

// Add the billboard entity to an anchor on the ARView
rootAnchor.addChild(billboard)