Skip to content

Does not work with raycasters, under A-Frame 9.0 #60

@DougReeder

Description

@DougReeder

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions