I have a Sphere Entity that has a VideoMaterial on it and a floor, i want to have the reflection of the video material on that floor. Any possible ways?
Post
Replies
Boosts
Views
Activity
I have a Entity which is loading a USDZ asset.
let modelName = "example.usdz"
guard let modelURL = Bundle.main.url(forResource: modelName, withExtension: nil) else {
fatalError("Failed to find model file: \(modelName)")
}
let videoEntity = try! Entity.load(contentsOf: modelURL)
Now i am creating a video Material using AVPlayer, VideoMaterial
let asset = AVURLAsset(url: url)
let playerItem = AVPlayerItem(asset: asset)
let player = AVPlayer()
let material = VideoMaterial(avPlayer: player)
And adding Video material to a sphere
videoEntity.components.set(ModelComponent(mesh: .generateSphere(radius: 1E3), materials: [material]))
But I want a mesh of my 3d model as shape.
Any Possible Ways to Achieve This.