How to Create a Ray with Ignore Collision Entity? Or Multi Hit Result

As the Pictures, Can I Do This?

Seems it only supply RaycastFirst function In API.

How Can I do this Like Unity? Thanks.

Where are the High Hands ?

We don’t currently have a method to return all raycast results (Bullet does include an implementation but it’s not exposed in Ammo which PlayCanvas uses).

I’m not sure if raycasting can use the collision masks and groups to ignore entities. We’d have to check that support in ammo.

Anyother Ways ? Have.

Hi @fs_wTong

How did u figure out that? Any news about it?

I wanna ignore some assets, like water and glass.

Thanks!

Running into the same problem at the moment. Did anyone find a solution or workaround to this problem?

It’s not supported out of the box in PlayCanvas but you can add groups and masks to the entities and create a raycast that can filter those groups. See thread: Raycast through multiple entities

Can’t we code it in ourselves ?but I doubt it’ll be easy.Probably would take alot of research heh

https://developer.playcanvas.com/en/api/pc.RigidBodyComponentSystem.html#raycastAll

Playcanvas engine recently received the raycastAll method!

1 Like