-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to edit rayperception sensor 3d outputs ! #6130
Comments
This issue is stale because it has been open for 30 days with no activity. |
To achieve the behavior where the RayPerceptionSensor3D in Unity detects everything except the child objects of its own snake (tagged as "beads"), you can implement a custom filtering mechanism. Use Layers for Filtering: Custom Script for Tag Checking: |
NO that's not how it is . All my snake works on a similar pattern ! I can't
just make a unique tags with n number of snake . All those AI snake have
same properties they have to ! They compete with each other having the same
body. What I really want is to have a filtering system like filtering the
gameobjects that rayperception is giving
…On Wed, 21 Aug 2024 at 19:48, Shubham Kumar ***@***.***> wrote:
To achieve the behavior where the RayPerceptionSensor3D in Unity detects
everything except the child objects of its own snake (tagged as "beads"),
you can implement a custom filtering mechanism.
Use Layers for Filtering:
Assign a Unique Layer: Assign a unique layer to your snake and its child
objects (e.g., MySnakeLayer). This way, you can easily filter out these
objects from the ray perception.
RayPerception Layer Mask: Adjust the layer mask of the
RayPerceptionSensor3D to exclude this specific layer. This will make the
ray sensor ignore objects on that layer.
Custom Script for Tag Checking:
If you want to keep using tags and not just rely on layers, you can modify
the ray perception script or create a wrapper around it. In the custom
script, you can manually check the tag of each detected object and ignore
the ones that belong to the same snake.
—
Reply to this email directly, view it on GitHub
<#6130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUH6DSS4RMIIQGZCXFLSVYTZSSOUVAVCNFSM6AAAAABLAAFQCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBSGE3DSNZRHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I am making a snake AI . Where there will be lots of snake who will eat and dodge each other .
Rayperception sensor 3d detects everything ! but there is a specific case where problem happens....
For example my snake has 30 cube child each having tags as beads . There are other snake similar to that.
I want rayperception to not detect these CHILD of it's own but to detect everything else !
How do you think will it happen ?
The text was updated successfully, but these errors were encountered: