Skip to content
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

Open
BHBit580 opened this issue Jul 17, 2024 · 3 comments
Open

I want to edit rayperception sensor 3d outputs ! #6130

BHBit580 opened this issue Jul 17, 2024 · 3 comments
Labels
request Issue contains a feature request.

Comments

@BHBit580
Copy link

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 ?

@BHBit580 BHBit580 added the request Issue contains a feature request. label Jul 17, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Issues that have been idle for a while. Automatically closed by a bot if idle for too long. label Aug 16, 2024
@shubhamkatyaan
Copy link

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.

@github-actions github-actions bot removed the stale Issues that have been idle for a while. Automatically closed by a bot if idle for too long. label Aug 21, 2024
@BHBit580
Copy link
Author

BHBit580 commented Aug 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Issue contains a feature request.
Projects
None yet
Development

No branches or pull requests

2 participants