• Rotate DModelPanel manually with cursor?
    3 replies, posted
Im making a character creation menu but cant figure out how to make it rotate only when player is holding cursor over it or by dragging it, any ideas? Currently I'm using this code which just rotates it quickly all the time. [code] function playermodel:LayoutEntity(Entity) Entity:SetAngles(Angle(Entity:GetAngles().p, Entity:GetAngles().y+0.5, Entity:GetAngles().r) ) end [/code]
Hey, you can check it using [URL="http://wiki.garrysmod.com/page/input/IsMouseDown"]input.IsMouseDown[/URL] and simply not let it rotate otherwise :)
Got it working, thanks! :)
Use the [URL="https://wiki.garrysmod.com/page/Category:DAdjustableModelPanel"]DAdjustableModelPanel[/URL]
Sorry, you need to Log In to post a reply to this thread.