Couldn’t find an answer. How do I use them?
following script:
walled = Physics2D.OverlapArea(wallCheck.position, checkArea, whatIsWall);
- wallCheck is a Transform variable →
Vector A - checkArea is a Vector2 variable →
Vector B - whatIsWall is a LayerMask.
issue with this. This returns always true, no matter if it overlaps with the according layer or not. I put the object out into nirvana and it still returns always true.
OverlapCircle works charmingly fine but not what I want.
Or is something wrong with my Gizmo? But I moved my Object ten million miles away from any object or Layers. It was impossible to overlap with anything…
Gizmos.DrawWireCube(wallCheck.position, checkArea);