Commit Graph

314 Commits

Author SHA1 Message Date
penolakushari
f4d847360d
Merge pull request #68 from penolakushari/advsel_shapes
Advanced Select Clarity
Adds different shapes for different bone types in advanced selection mode (square - physical, circle - nonphysical, triangle - procedural, rotated triangle - parented)
Also bone that is being hovered over in advanced select mode will now pulse its scale so it will be easier to tell what we are about to select. (vlazed)
2025-02-19 19:42:10 +03:00
vlazed
6134e33504
Add visual indicator of advanced selected bones (#15)
* Add visual indicator of advanced selected bones
+ Add bone scaling indicator when the user hovers over a bone using advanced bone select. Bones also scale when selecting from a set of bones, or when looking through the bone options
* Rename SelectedBones -> BoneScaleGroup; revert scale amplitude
* Synchronize bone scale with UI
- Change `CurrentBoneScales` into a `ClientBoneState` singleton which stores scales and the selected entity. We call methods on this singleton to ensure that the visual bone scaling indicator works as intended, while also ensuring that the UI stays in sync with that state
2025-02-19 19:24:14 +03:00
penolakushari
4722de62f9 Added different shapes in advanced selection mode that allow to discern bone types, as just having them be different colors may not be easily noticeable if they are darkened 2025-02-15 20:26:23 +03:00
penolakushari
2c9c5a9417
Merge pull request #67 from penolakushari/master
Use `util.IsPointInCone` instead of `pos.visible` (#14)
2025-01-26 20:30:25 +03:00
vlazed
15dbe3694d
Use util.IsPointInCone instead of pos.visible (#14)
* Use `util.IsPointInCone` instead of `pos.visible` to restrict edge cases

* Further restrict the view cone angle

* Cache util.IsPointInCone in prevbones[i]; if it exists, we calculate fraction and color
- Also use cached result so we do not have to get bone positions

* Initially set `BoneColors = {}`, so we don't need to do `prevbones = {}` on `calc`

* View entity support for AdvBoneSelectRender
- Changed AdvBoneSelectRender to use the eyepos and eyevector of its viewentity
- Feed eyepos, eyeang, and fov arguments from DrawHud instead of calling for these again

* Opt to use the forward vector of the view entity, instead of cursor vector
2025-01-26 20:29:22 +03:00
penolakushari
7c9dcde28b
Merge pull request #66 from penolakushari/distance-color
Distance color
2025-01-23 01:13:14 +03:00
penolakushari
71b093c7b3 Clean up 2025-01-22 23:51:53 +03:00
penolakushari
5b5fd35a82
Merge branch 'Winded:master' into distance-color 2025-01-22 23:43:42 +03:00
penolakushari
b4d912d59b
Merge pull request #65 from penolakushari/master
Additional gizmo enhancements (#13)
2025-01-22 23:42:38 +03:00
vlazed
c0ce1103b5
Additional gizmo enhancements (#13)
* Fix gizmos not catching up to cursor position
+ By default, the rgm_axis is created with MOVETYPE_NONE on the client, which causes the gizmo to delay its movement to the cursor. This fixes it by setting its movetype to MOVETYPE_VPHYSICS, replicating the behavior seen from tool ghost entities.

* Fixed inability to click on gizmos in some environments

* Change behavior for func_brush functionality
+ Added InitPostEntity hook to insert ragdollmover to all func_brush entities with a m_tblToolsAllowed field, which fixes unselectable gizmos in func_brush entities for singleplayer and multiplayer
- Removed rgm_ghost and ghost padding implementations, which has been superseded by the above hook

* Generalize to entities with brush planes instead of strictly func_brush

* Improved appending of ragdollmover to m_tblToolsAllowed
- Changed previous method to target all brush entities with a gmod_allowtools key instead of func_brush alone. This allows Ragdoll Mover to still be used if the brush entity has this key for some reason.

* Move table insert logic into the shared RGMAllowTool hook
- Moved table.insert of ragdollmover tool mode into rgmAllowTool hook
- Changed realm of EntityKeyValue to shared instead of server
2025-01-22 23:41:42 +03:00
penolakushari
0d3cf10666
Merge pull request #12 from vlazed/distance-color
Move on-screen check to prevent any calculations if its not on screen
2024-12-28 15:22:37 +03:00
vlazed
6b80c9d2be Move on-screen check to prevent any calculations if its not on screen
- Changed on screen check location from before copying the RGM_CIRCLE table to before performing bone distance calculations or setting draw color. This requires a check for prevbones to set distance colors, but this prevents any calculations from doing done at all. This achieves a 3% increase in performance (averaged over 600 frames)
2024-12-27 14:40:46 -06:00
penolakushari
3a490f5bb7 Removed caching bones and their parents in the skeleton drawing function as it didn't seem to save that much performance anyway 2024-12-26 20:28:47 +03:00
penolakushari
aaf725a8b0 Removed some tabs that were left in by mistake, made delays actually work and set skeleton calculations to happen 33 times per second. Still doesn't help performance 2024-12-25 18:50:02 +03:00
penolakushari
0b459b9727 Attempt to optimize skeleton drawing. Results don't show much difference other than not drawing objects that are out of view giving some more fps, so I guess drawing functions themselves are quite expensive 2024-12-24 22:07:54 +03:00
penolakushari
b7001ff354
Merge pull request #11 from vlazed/distance-color
On screen check and dot product
2024-12-23 23:12:42 +03:00
vlazed
b8a367d2b0 Optimizations to AdvBoneSelectRender
- Bone positions are only rendered when it is visible on the screen. This results in about 23% increase in performance on average from looking away at a model with 139 bones
+ Added comments about mindist and maxdist
2024-12-23 13:32:27 -06:00
vlazed
6ca12972fc Merge branch 'distance-color' of https://github.com/vlazed/RagdollMover into distance-color 2024-12-23 12:42:21 -06:00
vlazed
707cec284b Check if bone is visible on screen; use dot product for distances
- Also make dark colors darker so gradient is more noticeable
2024-12-23 12:39:39 -06:00
penolakushari
f12c354f43 Attempt to optimize the distance drawing by having it run distance check every 0.1 of a second rather than each tick 2024-12-23 12:26:08 -06:00
penolakushari
26977b69c9 Attempt to optimize the distance drawing by having it run distance check every 0.1 of a second rather than each tick 2024-12-23 20:12:54 +03:00
vlazed
5f1fea75ad Do subtraction of maxdist before loop 2024-12-23 09:57:33 -06:00
vlazed
24cdf226b6 Distance color changes
+ Gradient function to easily generate linearly-interpolated color gradients with NUM_GRADIENT_POINTS parameter
- The color to use is automatically evaluated using the number of gradient points and the distance, allowing one to generalize beyond two gradient points
- Darker colors
2024-12-22 23:51:28 -06:00
penolakushari
e81fd36d8f Changed color system from using lerp to just using look up table for colors 2024-12-22 20:55:21 +03:00
penolakushari
3b908bfdae Made bones in advanced bone select mode get darker the farther away they are from player's view 2024-12-22 16:49:15 +03:00
penolakushari
5722ce3071
Merge pull request #63 from vlazed/out-of-bound-gizmos
Increase gizmo padding to fix laggy gizmo
2024-12-19 22:44:52 +03:00
penolakushari
66ed30285b
Merge pull request #62 from NovaDiablox/patch-4
Updated Turkish L10n
2024-12-19 22:44:43 +03:00
vlazed
dcb02ad977 Increase gizmo padding to fix laggy gizmo 2024-12-19 12:54:28 -06:00
Tora
f66a458875
Update ragdollmover_tools.properties 2024-12-19 21:24:04 +03:00
penolakushari
d972becc8d
Merge pull request #61 from penolakushari/readability
Readability
2024-12-19 19:46:14 +03:00
penolakushari
8177af1e18
Merge branch 'Winded:master' into readability 2024-12-19 19:41:54 +03:00
vlazed
e05843450e
Make the gizmo update its position when out of bounds (#60)
* Make the gizmo update it's position when out of bounds
+ Gizmos can be selected when we set their collision bounds to be within the world.
2024-12-19 19:41:28 +03:00
penolakushari
93e86bcb66 Forgot to remove some of the things I've left in related to some feature I've decided not to implement for now 2024-12-19 19:39:23 +03:00
penolakushari
b93b57f7b6 Removed some of the function arguments that weren't doing anything 2024-12-19 19:24:35 +03:00
penolakushari
594d907d04 Fixed some errors with posing physical bones when resetting nonphys bones through sliders with middle mouse button 2024-12-17 20:50:44 +03:00
penolakushari
3c235dc4a8 Put net message related stuff into a table with functions related to them within the ragdoll mover tool, to help with readability. Assuming overhead from calling table + functions should not be an issue, considering that net messages aren't being as spammy as they used to. Also made big gray disc not being able to rotate nonphys bones - it wasn't doing it correctly before anyway 2024-12-03 23:50:30 +03:00
penolakushari
eefbda5c3b
Merge pull request #58 from penolakushari/adv_select_options
Advanced Selection manipulation options
2024-11-04 18:04:02 +03:00
penolakushari
bb67e6e6b8 Added an option to lock/unlock physical position and rotation at once 2024-11-03 07:02:32 +03:00
penolakushari
82ecfe24fc Fix to some errors related to trying to switch gizmo mode when already using them and trying to draw attachment bones that don't exist yet 2024-10-28 23:17:08 +03:00
penolakushari
2b186a31a0 Lock selected will now reset to 0 when clients loads into the gmae. It may need to be changed to not be a convar 2024-10-24 01:37:19 +03:00
penolakushari
0aec46bbb0 Locking bone to another bone should now hide angle and position locks in adv bone select options, added reset gizmo offset option to adv bone select options for quicker workflow when setting offset is needed 2024-10-02 22:53:17 +03:00
penolakushari
874edb41a6 Radial bone options menu now has colored options, things of similar functionality are colored in the same color. Any physics related locks will now make bones appear as locks in adv bone select mode, so it should be easier to find them. Corrected localization 2024-09-30 23:45:41 +03:00
penolakushari
5ec7072d56 Added ability to right click on bones in adv boneselect to bring up menu of additional bone functions 2024-09-30 02:02:59 +03:00
penolakushari
d661452cd5
Merge pull request #56 from penolakushari/scalefix
Gizmo scale fix
2024-09-29 08:41:16 +03:00
penolakushari
3f4ad5aed6 Added replicated flag to the sv_ragdollmover_max_prop_ragdoll_bones so it should now work properly in multiplayer 2024-09-19 21:01:33 +03:00
penolakushari
f84ee46bfa Moved 'Move physical bones with nonphysical' into misc category from scaling category 2024-09-15 16:47:39 +03:00
penolakushari
2c21cabe8f
Merge branch 'Winded:master' into scalefix 2024-09-13 23:24:24 +03:00
penolakushari
c564806c70
Merge pull request #55 from NovaDiablox/master
Updated Turkish Language
2024-09-13 23:23:57 +03:00
Tora
bed6155995
Update ragdollmover_ui.properties 2024-09-13 22:40:33 +03:00
Tora
44fcf96798
Add files via upload 2024-09-13 22:38:38 +03:00