I've been trying to understand clipplanes for hours, for some reason it always shows the upper part of the model, and i need it to do the opposite, can anyone tell me what i've been doing wrong?
[lua]function ENT:Draw()
local normal = self:GetUp()
local Mins = self:OBBMins().z
local Maxs = self:OBBMaxs().z
local Z = Mins+(((Maxs-Mins)/100)*self.dt.Factory.dt.PercentageComplete)
local distance = normal:Dot(self:LocalToWorld(Vector(0,0,Z)))
render.EnableClipping(true)
render.PushCustomClipPlane(normal,distance)
self:DrawModel()
render.PopCustomClipPlane()
end[/lua]
[lua]local normal = self:GetUp()*-1[/lua]
[editline]05:20PM[/editline]
That was just an educated guess by the way.
[QUOTE=MakeR;21629182][lua]local normal = self:GetUp()*-1[/lua]
[editline]05:20PM[/editline]
That was just an educated guess by the way.[/QUOTE]
For fucks sake, i've been at it for hours and you fix it in a min, i need a break.
Thanks by the way.
No problem.
Sorry, you need to Log In to post a reply to this thread.