So i've successfully learned the basics of 3d2d, but i have a problem, how can I move the derma backwards without it being all weird when I move the object around the map, ive tried
[CODE]
local pos = self:GetPos() + Vector(5,0,0)[/CODE]
but then it has the problem as I mentioned above
Is there even a way to move it along a x or z axis without it being weird? Heres my code
[CODE]
function ENT:Draw( ... )
self:DrawModel()
local ang = self:GetAngles()
ang:RotateAroundAxis(ang:Right() , -90)
ang:RotateAroundAxis(ang:Forward() , 0)
ang:RotateAroundAxis(ang:Up() , 90)
--ang:RotateAroundAxis(ang:Down() , 90)
cam.Start3D2D( getExactPos(), ang,0.5)
draw.RoundedBox(0,-35,-110,75,10,Color(255,255,200,255))
draw.RoundedBox(0,20,20,200-40,200-40,Color(240,10,10,255))
draw.SimpleText("Hello World!","TheDefaultSettings",100,100,Color(10,10,10,255),1,1)
cam.End3D2D()
end
function getExactPos()
local pos = self:GetPos() - Vector(10,0,0)
return pos
end
[/CODE]
Also on a sorta related note, How would I interact with a button if i put it on there? I assume I would use GetEyeTrace, but what would I do from there?
Thanks in advance
Use ent:GetForward() ent:GetUp() and ent:GetRight() more than adding a simple vector
You are getting errors. Read them. If you still can't figure it out, post them here.
By the way, you probably want [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/LocalToWorld]Entity:LocalToWorld[/url].
[QUOTE=gonzalolog;51141059]Use ent:GetForward() ent:GetUp() and ent:GetRight() more than adding a simple vector[/QUOTE]
So what would I do?
[CODE]pos = self:GetForward() + vector( 1, 0, 0) or like that?[/CODE]
With all due respect for gonzalolog, you should use the function I posted. All it does is make it easier to do the same thing you can do with the function he posted.
Sorry, you need to Log In to post a reply to this thread.