- Home /
The question is answered, right answer was accepted
Neither collision nor trigger being detected
Hi! For some reason, it seems my ray object isn't detecting collisions. The blast doesn't seem to be detecting the opponent (Red Heart on top).
I've made a short code for troubleshooting, but as you can see from the screenshot, the booleans don't change and the messages aren't sent. I've tried making the colliders triggers on and off on both objects permutatively, but to no avail. I even added a rigidbody to the blast, but it doesn't seem to be working. I made sure that both objects have 0 on their z-axis's position.
I've used both colliders and triggers before and didn't get this kind of problem. Sorry if this is a double post, but I have been checking for over an hour and haven't found something quite like this. What is going on? Please, help. Thanks in advance.
Answer by FTCosta · Oct 27, 2019 at 05:53 AM
Update: I managed to fix it. The composite collider simply wasn't working. When I changed it for a circle collider, everything worked as expected.
Answer by Favouriteless · Oct 25, 2019 at 11:39 AM
Hi! Try setting the Opponent to a normal collider. As far as I know, triggers won't trip other triggers.
If you are worried about player colliding with opponent, you can always put them on different layers and use the collisions matrix in Project Settings > Physics to solve that.
Answer by Marioooo · Oct 25, 2019 at 02:16 PM
this is a collision matrix... try to match some of these conditions to make the collision work
Follow this Question
Related Questions
Setting a Prefab Clone as the Child of another Object on Collision (2D) 1 Answer
How to set collision for an object with specific collider size? 3 Answers
How do I check that no collisions have a tag? 1 Answer
Player passing through wall when pushed 2d C# 0 Answers
Creating a "Connection" between two game objects using another game object. 0 Answers