- Home /
Question by
Gamelands-Studio · Sep 15, 2019 at 06:31 AM ·
rotationcolliderphysics2dangle
Physics2D.OverlapBoxAll's angle is weird
I created a hitting system that uses Physics2D colliders rather than a regular Collider, but my problem is the collider always points up (need rotate with the player's direction) help me pls.
in that example i have a spear in my hands, so the collider must be always on the spear :(
Here's the code
colliders = Physics2D.OverlapBoxAll(point + (Vector2)transform.position, size, hittingSystem.transform.rotation.z);
capture.jpg
(10.3 kB)
Comment