• Problem with rotation in 3d2d imgui
    1 replies, posted
Hey guys, So i am using wyozi's 3d2d imgui and i created a simple test gui. It works and all and i added it onto an entity. It works well i added it under ENT:Draw() input works fine and everything however i wanted to position it. I want it to be "welded" onto the entity, so on the Draw() i make it so the 3d2d imgui position gets set to the entity one. However, when i try to offset it so the gui is in the correct offset position from the entity that i want it to be it just starts flipping out when i rotate it. Like i rotate the entity but the gui has a different offset so it doesn't stick to the same offset position. I'll leave some screenshots to better explain myself: Assume this is the correct position: https://files.facepunch.com/forum/upload/294856/067c37a1-169d-45ae-a80c-27e5cb27f636/20180716022043_1.jpg After rotating the entity: https://files.facepunch.com/forum/upload/294856/6c0ad500-de67-4f4a-b8db-091ea08d84b3/20180716022051_1.jpg Could someone help me please? Is there a way to fix this? I thought about parenting but the gui aint an entity.
Use Angle/Forward on the monitor's angles to get it's front-facing direction. Something like this: local pos = ent:GetPos() + ( ent:GetAngles():Forward() * 128 )
Sorry, you need to Log In to post a reply to this thread.