Портал VisionOS: как выделить Entities?IOS

Программируем под IOS
Ответить
Гость
 Портал VisionOS: как выделить Entities?

Сообщение Гость »


In the WWDC talk "Enhance your spatial computing app with RealityKit." we see how to create a portal effect with RealityKit. In the "Encounter Dinosaurs" experience on Vision Pro there is a similar portal, except this portal allows entities to stick out of the portal. Using the provided example code, I have been unable to replicate this effect. With the example code, anything that sticks out of the portal gets clipped.

How do I get entities to stick out of the portal in a way similar to the "Encounter Dinosaurs" experience?

I am familiar with the old way of using OcclusionMaterial to create portals, but if the camera gets between the OcclusionMaterial and the entity (such as walking behind the portal), this can break the effect, and I was unable to break the effect in the "Encounter Dinosaurs" experience.

If it helps at all: I have noticed that if you look from the edge of the portal very closely, the rocks will not stick out the way that the dinosaurs do; The rocks get clipped. Therefore, the dinosaurs are somehow being rendered differently.

I tried setting the scene up as described in the WWDC talk "Enhance your spatial computing app with RealityKit." I created a portal and gave it a PortalMaterial and PortalComponent targeting my world. I created a world and gave it a WorldComponent. I added everything to the scene with content.add and got the same effect as the WWDC talk, but cannot get entities to stick out of the portal. Adjusting the clippingPlane of the PortalComponent did not seem to help at all.


Источник: https://stackoverflow.com/questions/781 ... -stick-out
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»