https://steamuserimages-a.akamaihd.net/ugc/914672708284254606/3679E6FF60A39C36BC87FDB2E3F34E6D87FEBC61/
So I'm trying to place a interface just infant of the prop in the picture but I can't find out how to move it forward (towards where my player is in the picture) and I can only move up and down side to side. Here's what I've coded so far:
function ENT:Draw()
self:DrawModel()
local boxang = self:GetAngles()
ang:RotateAroundAxis(self:GetAngles():Forward(),90)
cam.Start3D2D(self:GetPos(), boxang , 1)
draw.RoundedBox(0,-50,-50,100,50,Color(255,0,0))
cam.End3D2D()
end
Any help would be greatly appreciated!
cam.Start3D2D(self:GetPos()+Vector(-20, 0, 0), boxang, 1)
Change -20 to anything you want
Not quite, that way it will ALWAYS move -20 units in the X direction, instead of ALWAYS moving forward or backward.
cam.Start3D2D(self:GetPos() + self:GetAngles():Up() - self:GetAngles():Right() * 20)
THEN you can change 20 to whatever you want. You'll have to experiment with the number a bit.
Something there is probably unnecessary, but it's what I keep using, and if it ain't broke, don't fix it.
Both worked really well, thank you!
Sorry, you need to Log In to post a reply to this thread.