I am trying to use cam3D2D in order to make a display for a custom printer. The display works well until the roll/yaw/pitch is changed:
examples:
[url]http://images.akamai.steamusercontent.com/ugc/456361914564109551/309908AAFA63DA6F438634E5F8AAB62BD1694316/[/url]
[url]http://images.akamai.steamusercontent.com/ugc/456361914564097370/076E8DD19E8AE2EF88C39C3F313795A22A6E4C56/[/url]
problem:
[url]http://images.akamai.steamusercontent.com/ugc/456361914564098005/9DC1C986A27727BCDD82F9DB18846CD8AD8F75F7/[/url]
If possible I would like to know how to prevent the yaw/pitch/roll change from effecting the distance from the face of the prop.
Here is my code:
[CODE]function ENT:Draw()
self:DrawModel()
local pos = self:GetPos()
local ang = self:GetAngles()
pos:Add(Vector(0,0,15))
ang:RotateAroundAxis(ang:Up(), 0)
ang:RotateAroundAxis(ang:Right(), 90)
cam.Start3D2D(pos + ang:Up() * -13.7, ang, 0.11)
draw.RoundedBox(0, -125, -125, 250, 250,Color(0, 0, 0, 240))
cam.End3D2D()
end[/CODE]
Any help is appreciated, thanks.
[editline]4th April 2016[/editline]
Fixed it!
Turns out the problem was that I was adding a fixed amount while adding a proportional amount to the position of the prop
Problem:
[CODE]pos:Add(Vector(0,0,15))[CODE]
Sorry, you need to Log In to post a reply to this thread.