I wrote this function to check if a position is inside a horizontal pramid with x and y. i dont really care about z in this one, any way to make it rotatable

```
/// <summary>
/// Check if position is within cone
/// </summary>
/// <param name="pyramidPosition">the position of the pyramid </param>
/// <param name="pyramid">the cone, X is widht, Y is height, Z is depth</param>
/// <param name="position">position of the object relative to the pyramidPosition</param>
/// <param name="overSteppedWith">Gives the amount its outside the pyramid</param>
/// <returns></returns>
public static bool GetInPyramid(Transform pyramidPosition, Vector3 pyramid, Vector3 position, out Vector3 overSteppedWith)
{
overSteppedWith = new Vector3();
bool outside = false;
Vector3 pyramidWidhtAtPosition = Vector3.LerpUnclamped(pyramidPosition.position, pyramid, position.z / pyramid.z);
if (Mathf.Abs(position.x) > Mathf.Abs(pyramidWidhtAtPosition.x))
{
outside = true;
overSteppedWith.x = position.x - pyramidWidhtAtPosition.x;
}
if (Mathf.Abs(position.y) > Mathf.Abs(pyramidWidhtAtPosition.y))
{
outside = true;
overSteppedWith.y = position.x - pyramidWidhtAtPosition.x;
}
return outside;
}
```