-
Notifications
You must be signed in to change notification settings - Fork 115
Description
A-Frame 0.9 makes a change:
Have raycasters only intersect against objects defined via .setObject3D. raycaster.objects should be specified (e.g., objects: [data-raycastable] or objects: .raycastable) because raycasting is expensive. raycaster.recursive property removed (#3980) but will default to be recursive only under objects defined via .setObject3D (#3652).
If you define an environment component like so:
<a-entity environment="preset: arches;" class="landscape"></a-entity>
and a raycaster component like so:
<a-entity raycaster="objects:.landscape; far:0.5;">
the following error is logged:
components:raycaster:warn [raycaster] For performance, please define raycaster.objects when using raycaster or cursor components to whitelist which entities to intersect with. e.g., raycaster="objects: [data-raycastable]".
and the raycaster does not fire any events when it should intersect the environment.
Full example, where you can fly through the environment (incorrect) but not the house (correct):
https://elfland-beta.surge.sh/arches/