Search Issue Tracker
Fixed in 5.0.X
Votes
0
Found in
5.0.0b2
Issue ID
630639
Regression
No
Physics.IgnoreCollision(Collider, Collider) sometimes affects wrong colliders
To Reproduce:
1. Run scene 'BOSS ONE' in the attached project.
2. Notice that after ~140 red bullets are fired collision breaks between some of them and the large white cube.
3. Decreasing the time after which the white cubes are destroyed (shotLife in BulletHell.cs) seems to have an effect on how soon collision breaks, if its 0 red cubes begin flying through the large cube after ~10 shots.
Also it has an effect on the amount of cubes which ignore collision, on 0 nearly no cubes actually collide in the beginning but afterwards its the same as on 10.
4. Remove the line:
Physics.IgnoreCollision(bullet.GetComponent<Collider>(), collider);
from SpawnBullet() in BulletHell.cs (line 54).
Not sure is this exactly what's causing this, but there nothing else in any script in the scene what might effect collision, except a similar statement, on the small red cube which fires the bullets.
Changing the layer to anything else but 'projectiles' seems to have strange effect on the bullet trajectory, they fly into random directions after exiting the large cube instead of going straight.
Collision detection setting seems to have no noticeable effect.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [URP] Crash on GameObject::QueryComponentByType when baking a Reflection Probe in an unsaved/untitled Scene
- No Icons are used for the Entry and Exit States in the Inspector when selected in an Animator Controller
- Crash on PlayerMain(int, char const**) when exiting Standalone Player with a Particle System in the Scene
- No Icon is used for the Runtime Animator Controller Type in a Search Window when assigning an Animator Controller in the Animator Component
- Unity Version Control server textfield’s text overlaps with the dropdown triangle button in the Explore repositories window when an organization with a long name is selected
Add comment