The question is answered, right answer was accepted
CircleCast hit its origin...
Hi everybody.
I'm making a 2D game. I disabled the option "Queries Start In Triggers" (that should be disabled by default), but when I do a CircleCast from my Player, I still hit it... Sometimes ! Yeah, it's not always, but it happens at totally random moments.
I thought that it could be the consequence of a too high radius, but it's the same with a radius of 0.001f.
... What I did wrong ? :( Thanks for your answers.
EDIT : This problem happens only if I specify a LayerMask in CircleCast parameters.
private int m_Layer;
private void Awake()
{
m_Layer = LayerMask.NameToLayer("Test");
}
private void Update()
{
return Physics2D.CircleCast(myPosition, radius, direction, distance, test);
}
The given layer is successfully not hit by the CircleCast. Now I specified a layer, if I collide with a wall and go in the other direction, I hit my Player... WTF ?!
EDIT : The problem was more complex, and is effectively a bug. It will be resolved soon.
Follow this Question
Related Questions
Raycast not detecting? 0 Answers
Raycast collision not working as expected 0 Answers
Raycast collisions being detected along a non-existent curve(?) 1 Answer
How to get my `collider2D.cast` work? 1 Answer
Check if position is inside a collider 5 Answers