Raycast First - Ignore by tag

Im trying to do a raycastFirst(vec3,vec3,options) but I want to ignore all objects that have a particular tag.

I can see there is some help in the IDE but not enough for me to understand how to write the syntax (see image). Can anyone help?
Thanks

have you checked the docs?

Yes Thanks. I saw them but I still couldnt figure it out. In the end Chat GPT came to my aid :slight_smile:
Here…


const hit = app.systems.rigidbody.raycastFirst(start, end,{
        filterCallback: function (entity) {
        // Skip if it has the 'ignore_ray' tag. 
        return !entity.tags.has('ignore_ray');
    }
    });
1 Like