I am trying to raycast from an entity into the sky, This is what I have and it keeps returning turn weather or not its under something.
Python:
class RockBaseFinder:
def On_EntityDeployed(self, Player, Entity):
if Player.Admin:
origin = Util.CreateVector(Entity.X, Entity.Y, Entity.Z)
#^^Testing on 1.0.7B not 1.0.8^^
direction = Util.CreateVector(float(0), float(1), float(0))
hit = UnityEngine.Physics.Raycast(origin, direction)
if hit:
#Player.Message("Hit something, A rock?")
else:
Player.Message("Nothing above")