Need some help with clip-planes.

http://www.majhost.com/gallery/Unib/GarrysMod/DeathlyWarfare/dw_devworld0025.jpg

That should just be all wireframe atm, since the NWVar is zero.

Only effects them when they’re at different angles, straight is fine:

http://www.majhost.com/gallery/Unib/GarrysMod/DeathlyWarfare/dw_devworld0019.jpg

[lua]
local matWhite = Material( “models/wireframe” )

function ENT:Draw()
	if self:GetNWBool("built") then
		self:DrawModel()
	else
		local mul = self:GetNWInt("tough")/self:GetNWInt("tough2")
		
		local clipPlaneUp = self:GetAngles():Up() * 1
		local clipPlaneDown = self:GetAngles():Up() * -1
		local clipPlaneCenter = self:GetPos() + self:OBBMins() + Vector( 0, 0, ( self:OBBMaxs().z - self:OBBMins().z ) * mul)
		local clipPlaneUpDistance = clipPlaneUp:Dot( clipPlaneCenter )
		local clipPlaneDownDistance = clipPlaneDown:Dot( clipPlaneCenter )

		render.EnableClipping( true )
			render.PushCustomClipPlane( clipPlaneUp, clipPlaneUpDistance )
				SetMaterialOverride( matWhite )
				self:DrawModel()
			render.PopCustomClipPlane()

			render.PushCustomClipPlane( clipPlaneDown, clipPlaneDownDistance )
				SetMaterialOverride(nil)
				self:DrawModel()
			render.PopCustomClipPlane()
		render.EnableClipping( false )
	end
end

[/lua]

I really don’t know the mathmatics to make this right, any help FP?

Try getting the angles of the world rather than that of the prop. It might not get want you want but it probably will work better.