var objectB : Transform ;
function Update ()
{
// if the box is on the ground, that gets printed to the screen
if (objectB.position.y < -1.8)
{
print("The box is now sitting on the ground.");
}
// if the box is picked up, that gets printed to the screen
if (objectB.position.y > -1.45)
{
print("The box is now up!");
}
}
when the level starts this is fine, it says the The box is now sitting on the ground. When the box gets picked up it says The box is now up!
But when the box gets put back down, it still says The box is now up! How do I make it when the box is set back down to say The box is now sitting on the ground. ??
This will help me finish the whole parent/child collision problem I’m having (I think).
Thanks, David