ULX

Author Topic: Set entity angles question  (Read 1500 times)

0 Members and 1 Guest are viewing this topic.

Offline Doomed

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Set entity angles question
« on: May 28, 2017, 11:07:11 PM »
How would I go about setting the angles of an entity via mouse input? For example, holding USE will allow you to rotate it freely and shift + USE will perform 45 degree snaps (basically, like the physgun)

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Set entity angles question
« Reply #1 on: May 29, 2017, 10:46:24 AM »
I think the gui library has everything you need for mouse input -- http://wiki.garrysmod.com/page/Category:gui. Then use SetAngles based on your rotation -- http://wiki.garrysmod.com/page/Entity/SetAngles.
Experiencing God's grace one day at a time.