• 3d2d problems
    2 replies, posted
Hi, I've been having this one annoying problem with 3d2d, the 3d2d object does not rotate with the entity. [IMG]https://i.gyazo.com/46b2a7fdc0a6fb1f95308c693bc5a7d2.jpg[/IMG] [CODE] cam.Start3D2D(self:GetPos() + Vector(0,0,25),ang + Angle(0,180,39),0.1) draw.RoundedBox(0,0,40,500,200,Color(0,0,0)) draw.SimpleText("Genetic Processor","EbolaProcessFont",160,100,Color(255,255,255),1,1) if self:GetNWBool("IsProcessing") == false then draw.SimpleText("OFF","EbolaProcessFont",160,150,Color(255,0,0),1,1) end if self:GetNWBool("IsProcessing") == true then draw.SimpleText("ON","EbolaProcessFont",160,150,Color(0,255,0),1,1) end cam.End3D2D()[/CODE] Now, I think it might be the way I've set the positions, but if I mess with them, I can't move the 3d2d object on it's z axis or angles. If you know a workaround or a solution, please let me know. Thanks! -Glaze
Do not add angles and positions like that in 3d2d, use RotateAroundAxis for angles and WorldToLocal for position. ( Search these on the wiki )
I think Robotboy meant LocalToWorld, and there's also [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/LocalToWorldAngles]Entity:LocalToWorldAngles[/url] which IMO is much easier to use than RotateAroundAxis.
Sorry, you need to Log In to post a reply to this thread.