Hi there,
I am using Bounds.Intersects() to check if a bounds intersects with another.
My issue is that, that return is true, when visually it is not. My only guess of potential issue is that one of the bounds in on a half pipe, so a convex shape.
Anyone have any guesses? Tips?
void checkIfCanLand(){
//print("check " + Time.time);
bool canLand = true;
for(int i = 0; i < bodyBounds.Length; i++){
if (bodyBounds[i].Intersects(pipeBounds))
{
print(" body bounds i " + playerBodyBits[i].transform.name + ", is intersecting");
canLand = false;
}
else
{
print("no " + i);
}
}
if (canLand)
{
tf_skier.localEulerAngles = cachedRtnAtLaunch;
PlayerRtnZ.ins.landPlayer();
isLaunched = false;
}
else
{
print("CRASH!! ");
Time.timeScale = 0;
}
}