Hi there, after a good amount of searching I haven’t been able to find out how to change the rotation of my overlap boxes set up.
//draw a hitbox in front of the character to see which objects it collides with
Vector3 boxPosition = transform.position + (Vector3.up * lastAttack.collHeight) + Vector3.right * lastAttack.collDistance;
Vector3 boxSize = new Vector3 (lastAttack.CollSize/2, lastAttack.CollSize/2, hitZRange/2);
Collider[] hitColliders = Physics.OverlapBox(boxPosition, boxSize, transform.rotation, HitLayerMask);
I’m using it for damage calculation.
I want the OverlapBox to take the same rotation of the player and always be in front of the player.