Ulysses

General => Developers Corner => Topic started by: Doomed on May 28, 2017, 11:07:11 PM

Title: Set entity angles question
Post by: Doomed 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)
Title: Re: Set entity angles question
Post by: Megiddo 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.