Returns list of corners this actor had with a box collider on destLocation
Source
List<Vector2> getColliderBoxCorners(Vector2 destLocation) { List<Vector2> tList = new List<Vector2>(); final radians = atan2(this.rotation.x, this.rotation.y); final tCollider = colliderBoxExtent; tList.add(_rotatePointAround(new Vector2(destLocation.x - tCollider.x / 2.0, destLocation.y - tCollider.y / 2.0), destLocation, radians)); tList.add(_rotatePointAround(new Vector2(destLocation.x - tCollider.x / 2.0, destLocation.y + tCollider.y / 2.0), destLocation, radians)); tList.add(_rotatePointAround(new Vector2(destLocation.x + tCollider.x / 2.0, destLocation.y + tCollider.y / 2.0), destLocation, radians)); tList.add(_rotatePointAround(new Vector2(destLocation.x + tCollider.x / 2.0, destLocation.y - tCollider.y / 2.0), destLocation, radians)); return tList; }