Nebual / sandbox-plus

A community fork of Facepunch's Sandbox gamemode for s&box, with tweaks to allow modular addons, like Wirebox, to extend it further
MIT License
16 stars 9 forks source link

Add move/rotate functionality to the constraint tool #23

Closed LtBrandon closed 1 year ago

LtBrandon commented 1 year ago

I fixed the move functionality (it didn't appear to move the entity most of the time), and added the code for rotation to work. I'd like to lock the camera in place while the rotation is happening, but I'm not sure how to go about that right now.

I also refactored the tool stages to use an enum. I've always found using an int for these incredibly confusing in Garry's Mod, and in this case it was also causing bugs because different buttons were sharing stage numbers. Now it should be very clear what the tool is doing when looking at the code. Normally I'd do this as a separate pull request, but I forgot to branch before I started on the rotation code.