

ENT.Type = "anim"

ENT.PrintName		= "Hover Ball"
ENT.Author			= ""
ENT.Contact			= ""
ENT.Purpose			= ""
ENT.Instructions	= ""

ENT.EFFECT_NONE		= 0
ENT.EFFECT_MATRIX	= 1

ENT.IDX_EFFECT		= 0
ENT.IDX_ALTITUDE	= 1


// Returns the distance from the hover point as a fraction of the distance away from it
function ENT:GetFractionFromHover()

	local StartPos = self.Entity:GetPos()
	
	local trace = {}	
	trace.start		= StartPos
	trace.endpos	= StartPos - Vector( 0, 0, self.Altitude * 2.0 )
	trace.mask		= MASK_WATERWORLD
			      
	local fraction = util.TraceLine( trace ).Fraction
	fraction = (fraction * 2) - 1
	
	return fraction;

end
