if (300 < Enitiy.Y){
}
I see what you mean, but why doesn't it work ?So if a Pillar is over *Insert number here* high it is destroyed.
I can get to be destroyed if greater than 300 by doing:
Just need to know how to get the height starting at a foundationJavaScript:if (300 < Enitiy.Y){ }
EDIT: At first I thought World.GetGround would work, Nope![]()
The World.GetGround?I see what you mean, but why doesn't it work ?
public float GetGround(float x, float z)
{
return this.GetGroundDist(x, float.MaxValue, z);
}
public float GetGroundDist(Vector3 vector3)
{
return this.GetGroundDist(vector3.x, vector3.y, vector3.z);
}
public float GetGroundDist(float x, float y, float z)
{
RaycastHit hitInfo;
if (Physics.Raycast(new Vector3(x, y, z), Vector3.down, out hitInfo))
return hitInfo.distance;
else
return float.NaN;
}
Yes but you need to give it an x axis and a z axis for it to get the Y axis. I guess it is World.GetGround(float x, float z).So I would use World.GetGround?
if((World.GetGround(Entity.X, Entity.Z) + 8) < Entity.Y){Yes but you need to give it an x axis and a z axis for it to get the Y axis. I guess it is World.GetGround(float x, float z).