Compare commits

...

243 Commits
4.1.2 ... main

Author SHA1 Message Date
f177384da3 Update README to with links to the new repo site 2025-04-16 08:45:51 +02:00
Pascal Serrarens
bfa05a93e3 Added URP prefabs and materials 2024-11-28 14:02:03 +01:00
Pascal Serrarens
4d53839164 Fix wrong UNITY version in #if 2024-11-28 13:01:55 +01:00
Pascal Serrarens
0d22094ba4 Merge branch 'main' of http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free 2024-11-28 12:58:15 +01:00
Pascal Serrarens
ab5d034f6e UNITY 6 compatibility improvements 2024-11-28 12:57:52 +01:00
Pascal Serrarens
9e7a685815 UNITY 6 compatibility improvements 2024-11-28 12:36:48 +01:00
Pascal Serrarens
fd9bc37467 Hide Cube in target rig 2024-05-06 10:41:29 +02:00
Pascal Serrarens
f1ef79a103 Merge branch 'main' of https://gitlab.passervr.com/passer/unity/humanoidcontrol4_free 2024-03-18 09:25:36 +01:00
Pascal Serrarens
6dcd64ddc7 Updated gitignore 2024-03-18 09:24:19 +01:00
fbfbb8cbaf Fix focus change 2024-03-11 08:49:32 +01:00
90b4c46988 Fix Quest both hands get tracking state when only one is being tracked 2024-02-21 10:38:46 +01:00
a3a2732060 Prevent ghost clicks using finger interaction 2024-02-08 15:38:52 +01:00
Pascal Serrarens
48f5a48639 Change start site URL to humanoidcontrol.com 2024-01-19 09:58:35 +01:00
Pascal Serrarens
039b347475 Update package.json 2024-01-19 08:32:42 +00:00
Pascal Serrarens
3d37b1a61e Exclude package.json from git 2024-01-19 09:20:25 +01:00
Pascal Serrarens
c0effaf025 Updated scenes 2024-01-18 16:55:26 +01:00
Pascal Serrarens
66e07c9bdc Fixed prefabs 2024-01-18 16:55:05 +01:00
Pascal Serrarens
3a15ab000f Removed erroneous prefabs 2024-01-18 16:54:36 +01:00
Pascal Serrarens
0a609ce083 Exclude screen space UI elements from world interaction 2024-01-18 12:15:39 +01:00
Pascal Serrarens
36660c8495 Fix compatibility with Unity older than 2022.1 2024-01-18 12:14:00 +01:00
Pascal Serrarens
70f9edc918 Fix TargetRigOrientation to match Unity coordinate system. 2024-01-16 15:50:00 +01:00
Pascal Serrarens
c7c92f3e53 Removed empty prefabs 2024-01-16 15:32:00 +01:00
Pascal Serrarens
d7c2f3b960 Fixed unit tests 2024-01-16 15:28:50 +01:00
Pascal Serrarens
27afc9d501 Fix missing assets 2024-01-16 12:39:20 +01:00
Pascal Serrarens
f1a4ced59d Fixed missing components 2024-01-16 12:23:18 +01:00
Pascal Serrarens
8b199b9c78 Updated gitignore 2024-01-16 12:00:27 +01:00
Pascal Serrarens
ea9deb82fb Added namespaces 2024-01-16 11:57:58 +01:00
Pascal Serrarens
83ab3a6dbe Model cleanup 2024-01-16 11:44:48 +01:00
Pascal Serrarens
9e19dfd5af Removed obsolete GameControllerInputSettings 2024-01-16 11:44:14 +01:00
Pascal Serrarens
c852dc4a1e Added hidden float reverting setting (hidden, because it is still experimental)
This reverts the effect of the float correction when the avatar has bent knees.
2023-12-21 11:32:29 +01:00
Pascal Serrarens
ddb76e71de Update package version number 2023-11-27 16:07:05 +01:00
Pascal Serrarens
78a3d2f38a Merge branch 'main' of http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free 2023-11-27 15:33:00 +01:00
Pascal Serrarens
0d6446ae18 Added PhotonPUN support 2023-11-27 15:29:38 +01:00
9e5916d06c Head movements from gaze no longer not work when headanimation is disabled 2023-11-03 10:11:55 +01:00
Pascal Serrarens
3c853c3ba1 Do not disable eye behaviour for remote avatars 2023-11-02 10:34:31 +01:00
Pascal Serrarens
9489cdc5b5 Corrected empty possestion loading 2023-10-30 12:01:40 +01:00
Pascal Serrarens
46da2dfe1b Check on possessionlocation being empty besides just null 2023-10-30 11:06:36 +01:00
Pascal Serrarens
65aad9159e Update package.json 2023-10-05 12:33:33 +00:00
Pascal Serrarens
c0256f8c9b Fix missing head target when initializing face 2023-09-28 09:57:39 +02:00
Pascal Serrarens
eeb74e2491 Fix face tracking support detection 2023-09-28 09:38:05 +02:00
Pascal Serrarens
bf7cd6c188 Fix typo bug 2023-09-19 21:19:55 +02:00
Pascal Serrarens
64e5a573cb Added simpleSpineIK setting alias 2023-09-19 21:18:04 +02:00
Pascal Serrarens
43edc40b53 Fix unstable humanoid pose when using pose and simpleSpineIK 2023-09-19 21:15:29 +02:00
411b97e33d Added Getting Started documentation 2023-09-12 11:26:33 +02:00
27fc3b7eb6 Fix start position 2023-09-11 16:06:55 +02:00
ff47263fce Add PhotonPun documentaion 2023-09-11 12:15:43 +02:00
0cdbfadfa5 Added HTC Vive Trackers to main document page 2023-09-11 10:54:30 +02:00
227c242589 Added Ultraleap to the main doc pge 2023-09-11 10:33:07 +02:00
9b31c9a7d3 Added pose to the main documentaion page 2023-09-11 10:12:21 +02:00
81b7fee9ea Fix hand pose when changing avatars 2023-08-23 11:55:56 +02:00
285aefc2ae Fix controller orientation for OpenXR and Varjo 2023-08-14 11:05:37 +02:00
64af1d26da Corrected controller orientation 2023-08-07 17:13:06 +02:00
efefc4b9fd Update accessibility 2023-06-02 12:51:13 +02:00
14ac81f2f2 Updated accessibility 2023-06-02 12:45:53 +02:00
43bd355b29 Update accessibility 2023-05-26 09:53:05 +02:00
dc166b9246 Fix error when changing avatar in networking 2023-05-26 09:32:13 +02:00
143add636f Fix weight of grabbed objects without handles 2023-05-15 14:12:05 +02:00
0cb43c31d0 Update accessibility 2023-05-10 10:27:12 +02:00
14d30d28e3 Fix error when UnityXR is not enabled 2023-05-10 10:26:50 +02:00
115fe62c49 Fix camera position when changing avatars 2023-05-08 17:34:53 +02:00
ba8d8cf6e0 Merge branch 'main' of http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free 2023-05-08 17:32:30 +02:00
Pascal Serrarens
bc6d236e1a Pose fixes 2023-05-03 14:03:26 +02:00
Pascal Serrarens
5d2459979c Fix sticking objects when using collider duplication 2023-04-21 10:09:42 +02:00
Pascal Serrarens
e33f599371 Fix controller orientation when using OpenXR 2023-04-20 16:00:14 +02:00
Pascal Serrarens
927dfff7d1 Fix ShowRealObjectsSwitch persistency 2023-04-18 11:49:12 +02:00
Pascal Serrarens
e3ea1ce371 Fix parameter persistence 2023-04-14 12:03:13 +02:00
Pascal Serrarens
31583b828a Enable Multi-edit 2023-04-14 11:06:04 +02:00
Pascal Serrarens
3d340c4312 Add check for disappeared colliders 2023-04-14 10:32:03 +02:00
Pascal Serrarens
178d242762 Update accessibility 2023-04-12 12:06:39 +02:00
Pascal Serrarens
34c45dc39a Update accessibility 2023-04-05 12:52:27 +02:00
Pascal Serrarens
c013cf0722 Update accessibility 2023-04-05 12:50:35 +02:00
Pascal Serrarens
f19acc5133 Update accessibility 2023-04-05 12:44:15 +02:00
Pascal Serrarens
71075deb47 Update accessibility 2023-04-05 12:32:36 +02:00
Pascal Serrarens
816bad12c2 Update accessibility 2023-03-30 13:09:23 +02:00
Pascal Serrarens
3f3f7f4d77 Update accessibility 2023-03-30 13:06:50 +02:00
Pascal Serrarens
6c0170e4cf Update accessibility 2023-03-29 14:51:36 +02:00
0174e943e7 Update CustomTracker documentation 2023-03-28 11:25:05 +02:00
8e768343d8 Updated CustomTracker documentation 2023-03-28 11:21:50 +02:00
cfde4632cd Add Custom Tracker documentation 2023-03-28 10:44:43 +02:00
Pascal Serrarens
5138587eef Update accessibility 2023-03-22 14:57:34 +01:00
Pascal Serrarens
d3cafd3c15 Update accessibilty 2023-03-22 14:56:06 +01:00
Pascal Serrarens
a69e74e853 Update accessibility 2023-03-22 14:53:12 +01:00
Pascal Serrarens
724dd8a07a Fix typo 2023-03-22 14:32:17 +01:00
Pascal Serrarens
c4bd28c4e7 Update accessibility 2023-03-22 14:22:22 +01:00
Pascal Serrarens
1e616284c0 Update accessibility 2023-03-22 11:29:41 +01:00
Pascal Serrarens
d2fe125488 Update accessibility 2023-03-22 11:26:46 +01:00
Pascal Serrarens
7c46b252dd Update accessibility 2023-03-22 11:12:43 +01:00
Pascal Serrarens
a7498aeb9f Updated accessibility 2023-03-16 10:42:51 +01:00
9093521f43 Merge branch 'main' of http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free 2023-03-14 10:55:06 +01:00
aa61ffd2f4 Fix UnityXR Haptics 2023-03-14 10:54:52 +01:00
Pascal Serrarens
43cf7767c4 Updated inheritance 2023-03-07 12:11:37 +01:00
Pascal Serrarens
750fccaaaa Improve Unity XR-Oculus detection 2023-03-06 17:18:33 +01:00
6d3c7edd0d Fix tracking status for UnityXR Controllers 2023-03-02 13:55:29 +01:00
e991920a18 Cleanup 2023-03-02 13:53:00 +01:00
Pascal Serrarens
8769d7328f Disabled invalid HumanoidPlayer prefab path 2023-03-01 12:17:38 +01:00
Pascal Serrarens
ab36bea0a7 Cleanup 2023-03-01 12:06:35 +01:00
Pascal Serrarens
17f8325b37 Cleanup 2023-03-01 12:05:38 +01:00
Pascal Serrarens
a5d3dc6938 Cleanup 2023-03-01 12:00:08 +01:00
Pascal Serrarens
2f458dde27 Added Quaterion.ToSwingTwist utility function 2023-02-27 12:32:44 +01:00
Pascal Serrarens
3e448bc472 Added avatar change event 2023-02-27 12:30:09 +01:00
Pascal Serrarens
70e9210167 Updated Accessibility 2023-02-27 12:26:16 +01:00
Pascal Serrarens
a69f8c4eac Updated Accessibility 2023-02-27 12:24:09 +01:00
Pascal Serrarens
277662d107 Update accessibility 2023-02-24 16:53:12 +01:00
Pascal Serrarens
0bacb58481 Added additional torque method 2023-02-24 16:51:12 +01:00
Pascal Serrarens
cde1f4b594 Added additional access properties 2023-02-24 16:47:42 +01:00
Pascal Serrarens
fc79ea1a39 Added utility functions 2023-02-24 16:14:20 +01:00
Pascal Serrarens
af0fc71edd Updated accessibility 2023-02-24 16:09:36 +01:00
Pascal Serrarens
2ab022b22b Updated accessibility 2023-02-24 16:08:19 +01:00
Pascal Serrarens
5e4d59d30a Added custom CalculateForce 2023-02-24 16:01:26 +01:00
Pascal Serrarens
6c94ef65f8 Added TouchedStaticObject 2023-02-24 15:58:50 +01:00
Pascal Serrarens
870b5a5546 Changed accessibility 2023-02-24 15:58:06 +01:00
Pascal Serrarens
78a3a5119f Changed accessibility 2023-02-24 15:55:05 +01:00
Pascal Serrarens
1704c4bc05 Delete obsolete FootPhysics 2023-02-24 15:53:13 +01:00
Pascal Serrarens
77c9e37aef Updated function overriding 2023-02-24 15:40:16 +01:00
Pascal Serrarens
4d7ab052a2 Fixed class error when using PhotonPun 2023-02-24 15:28:08 +01:00
Pascal Serrarens
80ab32d237 Adjusted sensors accessability 2023-02-24 13:57:18 +01:00
Pascal Serrarens
ff63a67d9a Removed broken prefab 2023-02-24 13:43:55 +01:00
Pascal Serrarens
78cb4e4044 Update README.md 2023-01-23 15:57:34 +00:00
Pascal Serrarens
4eb1f1722d Update README.md 2023-01-23 15:48:41 +00:00
Pascal Serrarens
e646ef0f7d Update README.md 2023-01-23 15:13:51 +00:00
2b055edb6c Corrected version number in package.json 2023-01-23 15:56:51 +01:00
Pascal Serrarens
f99b3b9842 Update README.md 2023-01-20 14:47:56 +00:00
Pascal Serrarens
6cbdb9dfcb Merge branch '4_2beta' into 'main'
Updated Oculus Hand Tracking documentation

See merge request passer/unity/humanoidcontrol4_free!1
2023-01-20 14:40:22 +00:00
Pascal Serrarens
168e30c094 Removed support for Animator parameters support
This feature was always more theoretical than practical
2023-01-20 15:06:19 +01:00
Pascal Serrarens
abab50dc76 Cleanup 2023-01-16 17:55:00 +01:00
Pascal Serrarens
4f3088685d Updated Oculus Doc to new naming 2023-01-16 17:48:58 +01:00
Pascal Serrarens
098f544a37 Updated metadata 2023-01-16 16:56:11 +01:00
Pascal Serrarens
4a16af4dce Merge branch '4_2beta' of http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free into 4_2beta 2023-01-16 16:52:08 +01:00
Pascal Serrarens
6e1fb738e6 Added warning OVRPlugin too old for hand tracking 2023-01-16 16:51:59 +01:00
41b3755252 Update Oculus_Doc.cs 2023-01-16 12:42:56 +01:00
Pascal Serrarens
d04deb59e1 Updated Oculus Hand Tracking documentation
Added remark on minimum OVR plugin version 1.75.0
2023-01-16 11:16:32 +01:00
Pascal Serrarens
cfc3b22c00 Fixed QuestManifest generation 2023-01-13 18:12:09 +01:00
Pascal Serrarens
f447b2b301 Removed NetwokStarter 2023-01-13 17:39:27 +01:00
2738e5c9f0 Added Pose documentation 2023-01-05 16:02:18 +01:00
afb4a704ef Updated Animator documentation 2023-01-05 15:53:42 +01:00
9f8f819666 Added Animator doc 2023-01-05 15:40:23 +01:00
2cfc53e876 Added custom and oculus extension editors 2023-01-05 15:24:07 +01:00
ed750c012b Added Custom & Oculus extensions 2023-01-05 15:07:36 +01:00
02329b3532 Added support for Ultraleap Unity SDK v5 & v6 2022-09-29 15:32:09 +02:00
87672ce3ee Update status link on UnityXR hand skeleton... Still not supported. 2022-09-02 17:21:19 +02:00
6b3934cdd0 Updated documentation 2022-08-18 15:44:53 +02:00
4ede9f8c31 Updated images for RTF documentation 2022-08-18 14:40:36 +02:00
dfea57877e Fixed missing scripts 2022-08-18 12:35:18 +02:00
85c24ecea0 Fixed missing scripts/colliders 2022-08-18 12:26:16 +02:00
50b76d64f0 Fixed scripts on prefabs, removed experimental prefabs 2022-08-18 12:07:36 +02:00
1d99d6d15d Replaced Autodesk/Mixamo models with Robot Kyle variants 2022-08-18 11:55:31 +02:00
328edcb44c Fix HumanoidControl.Rotate 2022-08-05 15:53:43 +02:00
69a1ed2fff Added floating avatar correction 2022-07-28 13:52:31 +02:00
a055ff337a Added Oculus to the main documentation page 2022-07-01 17:09:43 +02:00
16f6d72219 Fixed for hand tracking 2022-07-01 17:08:16 +02:00
d11396b8bc Update documentation 2022-07-01 14:57:29 +02:00
188342a40f Added reference to PerceptionNeuron documentation 2022-07-01 14:36:36 +02:00
3aed07a76a Improved BodySkeleton support 2022-07-01 13:59:00 +02:00
47223965a2 Further cleanup of old VRTK stuff 2022-06-30 15:22:12 +02:00
13a43aa1e5 Further removal of old VRTK stuff 2022-06-30 15:17:43 +02:00
cb6f90da98 Removed old VRTK support 2022-06-30 15:12:45 +02:00
284c77d0a2 Updated sensors documentation 2022-06-29 14:30:01 +02:00
450ec9012f Removed unneeded HeadSensor 2022-06-29 14:19:07 +02:00
54cb265be1 Update Sensor/SensorComponent documentation 2022-06-29 13:45:21 +02:00
704559e150 Code improvement 2022-06-10 17:56:04 +02:00
2bcf3e5c10 Fix Grocery Store samples scenes 2022-06-09 17:17:02 +02:00
3551dcfd17 Fixed avatar in GroceryStore Resources folder 2022-06-09 17:08:36 +02:00
021efa5cb5 Update Test scene path 2022-06-09 16:46:14 +02:00
221818a81c Added Grabbing and Socket Editor Tests 2022-06-09 15:59:27 +02:00
c8c2a855c2 Made UnityXR Editor Test dependent on UnityXR begin enabled 2022-06-09 15:31:09 +02:00
20db91147d Fix compilation errors 2022-06-09 15:28:36 +02:00
ad17216055 Added first Editor Tests 2022-06-09 15:25:10 +02:00
80a5581054 Code improvements 2022-06-09 15:24:50 +02:00
ae7112de56 Code improvement 2022-06-03 17:59:07 +02:00
59f4add2ac Code improvement 2022-06-03 17:28:19 +02:00
219f2f987c Fix missing GetSensorComponent when UnityXR is disabled 2022-06-03 17:08:34 +02:00
998683a881 Code improvement 2022-06-03 17:02:05 +02:00
03948b8b01 Update Documentation 2022-06-03 15:35:19 +02:00
1f1e26615c Documentation update 2022-06-03 15:17:00 +02:00
eeb0009545 Vive Tracker support
Removed readme
2022-06-01 16:54:16 +02:00
59558c09e3 Added teleporter documentation 2022-05-25 17:58:55 +02:00
555c5fd2d8 Added check for SteamVR before enabling Vive Tracker support 2022-05-25 17:08:17 +02:00
d476b2c269 Added missing stuff 2022-05-23 17:07:43 +02:00
c252ba8b51 Renamed HumanoidFree folder to HumanoidControl 2022-05-23 15:34:44 +02:00
513092ca16 Fix body collisions with static objects 2022-03-28 14:53:42 +02:00
550cc04519 Fix head collision fader 2022-03-28 14:26:45 +02:00
a7bdaa081f Fix UnityXR position when humanoid is not on 0,0,0 2022-03-23 09:09:26 +01:00
8a3a2be643 Restore Hand and Body Poses 2022-03-16 14:03:37 +01:00
4648565214 Optional predefined viewId for NetworkObjects 2022-02-25 15:32:28 +01:00
9034590707 Make sure PhotonView viewID is not 0 in sites 2022-02-25 14:55:52 +01:00
228b5925b7 Check Networkobjects when building sites 2022-02-25 14:05:31 +01:00
a75c4b38ec Run NetworkObject checks before every build 2022-02-25 10:04:28 +01:00
94690b38e1 Fix default avatar loading error 2022-02-25 09:30:53 +01:00
145bb2e8bf Do not disconnect when networking has not been started yet 2022-02-24 16:51:03 +01:00
b7dd213e3a Merge branch 'main' of http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free 2022-02-24 16:38:20 +01:00
cb93a3b7f7 Disconnect when leaving a networked Site 2022-02-24 16:38:11 +01:00
Administrator
70389b2d64 Delete Third-Party-Notices.md.meta 2022-02-24 15:12:44 +00:00
Administrator
4c3edd4f80 Delete README.md.meta 2022-02-24 15:12:36 +00:00
Administrator
0df37f9c28 Add CONTRIBUTING 2022-02-24 15:12:11 +00:00
8b553966c4 Remove audiolistener from AvatarShop mirror 2022-02-24 16:01:51 +01:00
41c66b3eb6 Fix Calibrate Menu item 2022-02-24 16:01:26 +01:00
6166df3e80 Check if humanoid has an avatar when adding default avatar possession 2022-02-24 15:57:33 +01:00
24a0f22ce1 Fix menu not working after going to site from menu 2022-02-24 15:49:38 +01:00
3d7fff1c15 Fix Mirror aspect ratio 2022-02-24 15:16:00 +01:00
6bebede2a1 Added forgotten Materials/rendertextures for mirror 2022-02-24 14:59:25 +01:00
660d03ef67 Improved avatarshop mirror 2022-02-24 14:54:38 +01:00
44cedfc8ad Added a mirror in the avatarshop 2022-02-24 14:16:14 +01:00
31ff5058f8 Fixed Visitor VR menu 2022-02-24 14:02:56 +01:00
39cc19df48 Fixed possessionLocation == null serialization problem 2022-02-24 13:46:40 +01:00
58532dda73 Fixed possession caching 2022-02-24 13:20:19 +01:00
9e0911359b Fix possessable path loading from cache 2022-02-23 17:50:32 +01:00
7ee6e7a4d3 Merge branch 'main' of http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free 2022-02-23 16:47:57 +01:00
461006c8b4 Make default avatar possessable in VR Visitor 2022-02-23 16:47:39 +01:00
Pascal Serrarens
29de3d1b69 Add LICENSE 2022-02-23 11:02:33 +00:00
Pascal Serrarens
659353122e Delete LICENSE.meta 2022-02-23 11:02:15 +00:00
Pascal Serrarens
f6eb8fcf7b Delete LICENSE 2022-02-23 11:02:02 +00:00
6f760f4a92 Enabled Avatar Possessions 2022-02-23 11:57:36 +01:00
14937d96b9 Fix triggers/option/touchpad input with UnityXR enabled but not tracking 2022-02-23 09:41:39 +01:00
c7c5ab59e6 Fix input not working with UnityXR enabled but not tracking 2022-02-23 09:39:51 +01:00
71085cd6ee Fix unregistered double remote avatars when using local remotes 2022-02-22 17:59:12 +01:00
41409d627d Fixed site menu buttons 2022-02-22 17:49:52 +01:00
4b3bd49242 Fix wrong possessable name determination 2022-02-22 13:38:51 +01:00
075a5d7ba1 Fix loading wrong Possession 2022-02-22 13:32:04 +01:00
7d41944b98 Determine Possessable location only when it is not set yet 2022-02-22 13:12:49 +01:00
8d7142f3b0 Determine possesable siteLocation at scene load 2022-02-22 13:02:26 +01:00
9f7a96187f Make Possessable sitelocation static 2022-02-22 12:38:40 +01:00
04c589dec9 Determine sitelocation for changed avatar possessions 2022-02-21 18:11:54 +01:00
13a48376a3 Fixed error when possessionLocation == null 2022-02-21 17:57:09 +01:00
2c25f7832b Support avatar possession for network instantiate 2022-02-21 17:38:50 +01:00
f60f7a5634 Make possession retrieve cross-platform 2022-02-21 16:53:00 +01:00
c512dd42c3 Fix loading possesable avatar by name 2022-02-21 15:30:32 +01:00
d6de90fbe9 Fixed AvatarShop avatar possession path 2022-02-21 14:41:03 +01:00
18735e37e2 Fixed HumanoidPlayer singleton not working with Photon PUN 2022-02-18 17:58:23 +01:00
45cd4a16ef Fixes for possessable avatars 2022-02-18 17:42:44 +01:00
d5de37a168 Retrieve possessable avatars 2022-02-18 16:46:15 +01:00
7262f48fb2 Set Camera clearbox in Desktop Visitor to Solid color 2022-02-17 17:42:32 +01:00
68800cd96f Set Gunshot to mono for WebGL 2022-02-17 17:31:51 +01:00
ce9546b8ea Enabled Preload Audio Data on Audio files for WebGL 2022-02-17 17:08:25 +01:00
ec4e2a2ea2 Removed objecttable/shootingrange scenes from GroceryStore sample 2022-02-17 16:43:49 +01:00
21110b5be5 Correct Home Site address 2022-02-17 15:46:01 +01:00
acae3becdc Fix Reload/Back/Home button highlight and functionality 2022-02-17 15:35:31 +01:00
5fe3fda9f2 Back/Reload/Home now close the Menu 2022-02-17 15:24:30 +01:00
88cdf0de98 Merge branch 'main' of http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free 2022-02-17 09:50:58 +01:00
dd759b878f Change scene possessions AssetBundlename to scenename+_possessions 2022-02-17 09:50:50 +01:00
Pascal Serrarens
a24c86db3f Update README.md 2022-02-16 16:40:15 +00:00
Pascal Serrarens
3596f0067e Update README.md 2022-02-16 16:33:28 +00:00
Pascal Serrarens
daf16351cd Update README.md 2022-02-16 16:20:15 +00:00
b01ebb0570 Update package version number to 4.1.3 2022-02-16 15:57:20 +01:00
752 changed files with 69131 additions and 61405 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
Samples
Samples.meta
package.json
package.json.meta
Samples~.meta

5
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,5 @@
Contibuting to Humanoid Control Free
====================================
If you want to contribute to this project, make sure you have access to the repository.
You can request access by logging into our [GitLab site](https://gitlab.passervr.com/) with an GitHub or Google account.
Besides that, it is best to [contract us](https://passervr.com/contract) about you wanting to contribute to this project. This will ensure you will get access more quickly.

7
CONTRIBUTING.md.meta Normal file
View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c55d00a05de5d8340a1a49f5d8b2aeed
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -219,7 +219,7 @@ namespace Passer.Humanoid {
for (int i = 0; i < hcScripts.Length; i++) {
string assetPath = AssetDatabase.GUIDToAssetPath(hcScripts[i]);
if (assetPath.Length > 36 && assetPath.Substring(assetPath.Length - 27, 27) == "/Scripts/HumanoidControl.cs") {
humanoidPath = assetPath.Substring(6, assetPath.Length - 24);
humanoidPath = assetPath.Substring(0, assetPath.Length - 18);
return humanoidPath;
}
}
@ -250,7 +250,6 @@ namespace Passer.Humanoid {
//anyChanged |= SteamVRSettingUI(serializedConfiguration);
//anyChanged |= OculusSettingUI(serializedConfiguration);
//anyChanged |= WindowsMRSettingUI(serializedConfiguration);
//anyChanged |= VrtkSettingUI(serializedConfiguration);
//anyChanged |= LeapSettingUI(serializedConfiguration);
//anyChanged |= Kinect1SettingUI(serializedConfiguration);
@ -430,24 +429,6 @@ namespace Passer.Humanoid {
return anyChanged;
}
public static bool VrtkSettingUI(SerializedObject serializedConfiguration) {
SerializedProperty vrtkSupportProp = serializedConfiguration.FindProperty("vrtkSupport");
if (!isVrtkSupportAvailable)
vrtkSupportProp.boolValue = false;
else if (!isVrtkAvailable) {
using (new EditorGUI.DisabledScope(true)) {
EditorGUILayout.Toggle("VRTK Supoort", false);
}
EditorGUILayout.HelpBox("VRTK is not available. Please download it from the Asset Store.", MessageType.Warning, true);
}
else
vrtkSupportProp.boolValue = EditorGUILayout.Toggle("VRTK Support", vrtkSupportProp.boolValue);
return false;
}
public static bool LeapSettingUI(SerializedObject serializedConfiguration) {
SerializedProperty leapSupportProp = serializedConfiguration.FindProperty("leapSupport");
@ -800,7 +781,6 @@ namespace Passer.Humanoid {
configuration.viveTrackerSupport = CheckExtensionViveTracker(configuration);
configuration.oculusSupport = CheckExtensionOculus(configuration);
configuration.windowsMRSupport = CheckExtensionWindowsMR(configuration);
configuration.vrtkSupport = CheckExtensionVRTK(configuration);
configuration.neuronSupport = CheckExtensionNeuron(configuration);
configuration.hi5Support = CheckExtensionHi5(configuration);
configuration.realsenseSupport = CheckExtensionRealsense(configuration);
@ -848,8 +828,12 @@ namespace Passer.Humanoid {
}
public static bool CheckExtensionViveTracker(Configuration configuration) {
bool available = isViveTrackerSupportAvailable;
bool enabled = configuration.viveTrackerSupport;
#if UNITY_STANDALONE_WIN
bool available = isSteamVrAvailable && isViveTrackerSupportAvailable;
#else
bool available = false;
#endif
bool enabled = true; // configuration.viveTrackerSupport;
CheckExtension(available && enabled, "hVIVETRACKER");
return available && enabled;
}
@ -865,15 +849,14 @@ namespace Passer.Humanoid {
return CheckExtension(enabled, windowsMRPath, "hWINDOWSMR");
}
public static bool CheckExtensionVRTK(Configuration configuration) {
bool enabled = configuration.vrtkSupport && isVrtkAvailable;
CheckExtension(enabled, "hVRTK");
return enabled;
}
public static bool CheckExtensionNeuron(Configuration configuration) {
bool enabled = configuration.neuronSupport;
return CheckExtension(enabled, neuronPath, "hNEURON");
#if UNITY_STANDALONE_WIN
bool enabled = isNeuronSupportAvailable;
#else
bool enabled = false;
#endif
CheckExtension(enabled, "hNEURON");
return enabled;
}
public static bool CheckExtensionHi5(Configuration configuration) {
@ -891,6 +874,7 @@ namespace Passer.Humanoid {
public static bool CheckExtensionLeap(Configuration configuration) {
bool available = isLeapAvailable && isLeapSupportAvailable;
CheckExtension(available, "hLEAP");
CheckExtension(isUltraLeapAvailable, "hULTRALEAP");
configuration.leapSupport = available;
return available;
}
@ -949,6 +933,7 @@ namespace Passer.Humanoid {
public static bool CheckExtensionOptitrack(Configuration configuration) {
bool available = isOptitrackAvailable && isOptitrackSupportAvailable;
available = false; // hard disable because the code currently contains bugs
CheckExtension(available, "hOPTITRACK");
configuration.optitrackSupport = available;
return available;
@ -1038,7 +1023,7 @@ namespace Passer.Humanoid {
}
private static void CheckFaceTracking(Configuration configuration) {
if (IsFileAvailable(facePath)) {
if (DoesTypeExist("Passer.Humanoid.FaceTarget")) {
GlobalDefine("hFACE");
}
else {
@ -1113,9 +1098,9 @@ namespace Passer.Humanoid {
}
#endregion
#endregion
#region Availability
#region Availability
public static bool DoesTypeExist(string className) {
System.Reflection.Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
@ -1126,7 +1111,7 @@ namespace Passer.Humanoid {
return false;
}
#region SDKs
#region SDKs
protected static bool isUnityXRAvailable {
get {
@ -1135,6 +1120,9 @@ namespace Passer.Humanoid {
return false;
if (ConfigurationCheck.packageNameList.Contains("com.unity.xr.management"))
return true;
else if (ConfigurationCheck.packageNameList.Contains("com.unity.xr.oculus"))
// Somehow management is no longer available when Oculus is used
return true;
else if (ConfigurationCheck.packageNameList.Contains("com.unity.xr.openxr"))
// Somehow management is no longer available when OpenXR is used
return true;
@ -1148,8 +1136,7 @@ namespace Passer.Humanoid {
private static bool isSteamVrAvailable {
get {
return false;
//return DoesTypeExist("Valve.VR.SteamVR");
return DoesTypeExist("Valve.VR.SteamVR");
}
}
@ -1163,18 +1150,18 @@ namespace Passer.Humanoid {
}
}
private static bool isVrtkAvailable {
get {
return DoesTypeExist("VRTK.VRTK_SDKManager");
}
}
private static bool isLeapAvailable {
get {
return DoesTypeExist("Leap.Hand");
}
}
private static bool isUltraLeapAvailable {
get {
return DoesTypeExist("Leap.Unity.LeapTestProvider") == false;
}
}
private static bool isAstraAvailable {
get {
return DoesTypeExist("Astra.Body");
@ -1275,9 +1262,9 @@ namespace Passer.Humanoid {
}
#endregion SDKs
#endregion SDKs
#region Support
#region Support
private static bool isOpenVrSupportAvailable {
get {
@ -1326,11 +1313,6 @@ namespace Passer.Humanoid {
}
}
#endif
private static bool isVrtkSupportAvailable {
get {
return DoesTypeExist("Passer.Humanoid.VrtkTracker");
}
}
private static bool isLeapSupportAvailable {
get {
@ -1408,7 +1390,7 @@ namespace Passer.Humanoid {
private static bool isNeuronSupportAvailable {
get {
return DoesTypeExist("Passer.Humanoid.NeuronTracker");
return DoesTypeExist("Passer.Tracking.PerceptionNeuron");
}
}
@ -1445,9 +1427,9 @@ namespace Passer.Humanoid {
}
}
#endregion Support
#endregion Support
#endregion
#endregion
}
public static class CustomAssetUtility {

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ed397d272bcc7c14eb9d4a69d7ba578f
guid: 693f9f816fd82f44283cd7bf2ed3ef93
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,190 @@
#if hCUSTOM
using UnityEditor;
using UnityEngine;
namespace Passer.Humanoid {
using Passer.Tracking;
public class Custom_Editor : Tracker_Editor {
#region Tracker
public class TrackerProps : HumanoidControl_Editor.HumanoidTrackerProps {
protected SerializedProperty bodySkeletonProp;
public TrackerProps(SerializedObject serializedObject, HumanoidControl_Editor.HumanoidTargetObjs targetObjs, CustomTracker _custom)
: base(serializedObject, targetObjs, _custom, "custom") {
tracker = _custom;
bodySkeletonProp = serializedObject.FindProperty(nameof(HumanoidControl.custom) + "." + nameof(HumanoidControl.custom.bodySkeleton));
}
public override void Inspector(HumanoidControl humanoid) {
Inspector(humanoid, "Custom");
if (humanoid.custom.enabled == false)
return;
EditorGUI.indentLevel++;
bodySkeletonProp.objectReferenceValue = (BodySkeleton)EditorGUILayout.ObjectField("Body Skeleton", bodySkeletonProp.objectReferenceValue, typeof(BodySkeleton), true);
EditorGUI.indentLevel--;
}
}
#endregion Tracker
#region Head
public class HeadTargetProps : HeadTarget_Editor.TargetProps {
protected SerializedProperty sensorProp;
public HeadTargetProps(SerializedObject serializedObject, HeadTarget headTarget)
: base(serializedObject, headTarget.custom, headTarget, "custom") {
sensorProp = serializedObject.FindProperty("custom.sensorComponent");
}
public override void Inspector() {
if (headTarget.humanoid.custom.enabled == false)
return;
enabledProp.boolValue = HumanoidTarget_Editor.ControllerInspector(headTarget.custom, headTarget);
headTarget.custom.enabled = enabledProp.boolValue;
if (!Application.isPlaying) {
headTarget.custom.SetSensor2Target();
headTarget.custom.ShowSensor(headTarget.humanoid.showRealObjects && headTarget.showRealObjects);
}
if (enabledProp.boolValue) {
EditorGUI.indentLevel++;
if (sensorProp.objectReferenceValue == null && headTarget.custom.sensorComponent != null)
sensorProp.objectReferenceValue = headTarget.custom.sensorComponent; // sensorTransform.GetComponent<SensorComponent>();
sensorProp.objectReferenceValue = (SensorComponent)EditorGUILayout.ObjectField("Sensor", sensorProp.objectReferenceValue, typeof(SensorComponent), true);
EditorGUI.indentLevel--;
}
}
}
#endregion Head
#region Hand
public class HandTargetProps : HandTarget_Editor.TargetProps {
protected SerializedProperty sensorProp;
protected SerializedProperty attachedBoneProp;
public HandTargetProps(SerializedObject serializedObject, HandTarget handTarget)
: base(serializedObject, handTarget.custom, handTarget, "custom") {
sensorProp = serializedObject.FindProperty("custom.sensorComponent");
attachedBoneProp = serializedObject.FindProperty("custom.attachedBone");
}
public override void Inspector() {
if (handTarget.humanoid.custom.enabled == false)
return;
enabledProp.boolValue = HumanoidTarget_Editor.ControllerInspector(handTarget.custom, handTarget);
handTarget.custom.enabled = enabledProp.boolValue;
if (!Application.isPlaying) {
handTarget.custom.SetSensor2Target();
handTarget.custom.ShowSensor(handTarget.humanoid.showRealObjects && handTarget.showRealObjects);
}
if (enabledProp.boolValue) {
EditorGUI.indentLevel++;
if (sensorProp.objectReferenceValue == null && handTarget.custom.sensorComponent != null)
sensorProp.objectReferenceValue = handTarget.custom.sensorComponent; //.GetComponent<SensorComponent>();
sensorProp.objectReferenceValue = (SensorComponent)EditorGUILayout.ObjectField("Sensor", sensorProp.objectReferenceValue, typeof(SensorComponent), true);
attachedBoneProp.intValue = (int)(ArmBones)EditorGUILayout.EnumPopup("Bone", (ArmBones)attachedBoneProp.intValue);
EditorGUI.indentLevel--;
}
}
}
#endregion Hand
#region Hips
public class HipsTargetProps : HipsTarget_Editor.TargetProps {
protected SerializedProperty sensorProp;
protected SerializedProperty attachedBoneProp;
public HipsTargetProps(SerializedObject serializedObject, HipsTarget hipsTarget)
: base(serializedObject, hipsTarget.custom, hipsTarget, "custom") {
sensorProp = serializedObject.FindProperty("custom.sensorComponent");
attachedBoneProp = serializedObject.FindProperty("custom.attachedBone");
}
public override void Inspector() {
if (hipsTarget.humanoid.custom.enabled == false)
return;
enabledProp.boolValue = HumanoidTarget_Editor.ControllerInspector(hipsTarget.custom, hipsTarget);
hipsTarget.custom.enabled = enabledProp.boolValue;
if (!Application.isPlaying) {
hipsTarget.custom.SetSensor2Target();
hipsTarget.custom.ShowSensor(hipsTarget.humanoid.showRealObjects && hipsTarget.showRealObjects);
}
if (enabledProp.boolValue) {
EditorGUI.indentLevel++;
if (sensorProp.objectReferenceValue == null && hipsTarget.custom.sensorComponent != null)
sensorProp.objectReferenceValue = hipsTarget.custom.sensorComponent; //.GetComponent<SensorComponent>();
sensorProp.objectReferenceValue = (SensorComponent)EditorGUILayout.ObjectField("Sensor", sensorProp.objectReferenceValue, typeof(SensorComponent), true);
attachedBoneProp.intValue = (int)(TorsoBones)EditorGUILayout.EnumPopup("Bone", (TorsoBones)attachedBoneProp.intValue);
EditorGUI.indentLevel--;
}
}
}
#endregion Hips
#region Foot
public class FootTargetProps : FootTarget_Editor.TargetProps {
protected SerializedProperty sensorProp;
protected SerializedProperty attachedBoneProp;
public FootTargetProps(SerializedObject serializedObject, FootTarget footTarget)
: base(serializedObject, footTarget.custom, footTarget, "custom") {
sensorProp = serializedObject.FindProperty("custom.sensorComponent");
attachedBoneProp = serializedObject.FindProperty("custom.attachedBone");
}
public override void Inspector() {
if (footTarget.humanoid.custom.enabled == false)
return;
enabledProp.boolValue = HumanoidTarget_Editor.ControllerInspector(footTarget.custom, footTarget);
footTarget.custom.enabled = enabledProp.boolValue;
if (!Application.isPlaying) {
footTarget.custom.SetSensor2Target();
footTarget.custom.ShowSensor(footTarget.humanoid.showRealObjects && footTarget.showRealObjects);
}
if (enabledProp.boolValue) {
EditorGUI.indentLevel++;
if (sensorProp.objectReferenceValue == null && footTarget.custom.sensorComponent != null)
sensorProp.objectReferenceValue = footTarget.custom.sensorComponent; //.GetComponent<SensorComponent>();
sensorProp.objectReferenceValue = (SensorComponent)EditorGUILayout.ObjectField("Sensor", sensorProp.objectReferenceValue, typeof(SensorComponent), true);
attachedBoneProp.intValue = (int)(LegBones)EditorGUILayout.EnumPopup("Bone", (LegBones)attachedBoneProp.intValue);
EditorGUI.indentLevel--;
}
}
}
#endregion Foot
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 44d806c9717b1fa46a86f6a982c5e1b9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -54,27 +54,33 @@ namespace Passer.Humanoid {
protected void OculusHandTrackingInspector() {
#if hOCHAND
GUIContent labelText = new GUIContent(
"Oculus Hand Tracking",
"Enables hand tracking on the Oculus Quest"
"Quest Hand Tracking",
"Enables hand tracking on the Meta Quest"
);
oculusHandTrackingProp.boolValue = EditorGUILayout.ToggleLeft(labelText, oculusHandTrackingProp.boolValue);
#endif
}
protected virtual void CheckQuestManifest() {
string manifestPath = Application.dataPath + "/Plugins/Android/AndroidManifest.xml";
FileInfo fileInfo = new FileInfo(manifestPath);
fileInfo.Directory.Create();
bool manifestAvailable = File.Exists(manifestPath);
if (manifestAvailable)
try {
string manifestPath = Application.dataPath + "/Plugins/Android/AndroidManifest.xml";
FileInfo fileInfo = new FileInfo(manifestPath);
fileInfo.Directory.Create();
bool manifestAvailable = File.Exists(manifestPath);
if (manifestAvailable)
return;
string humanoidPath = Configuration_Editor.FindHumanoidFolder();
string questManifestPath = Application.dataPath.Substring(0, Application.dataPath.Length - 6) + // remove /Assets
humanoidPath + "Extensions/Oculus/QuestManifest.xml";
Debug.Log(questManifestPath);
File.Copy(questManifestPath, manifestPath);
}
catch (System.Exception ) {
return;
string humanoidPath = Configuration_Editor.FindHumanoidFolder();
string questManifestPath = Application.dataPath + humanoidPath + "Extensions/Oculus/QuestManifest.xml";
File.Copy(questManifestPath, manifestPath);
}
}
protected void ViveHandTrackingInspector(HumanoidControl humanoid) {
#if hVIVEHAND
GUIContent labelText = new GUIContent(
@ -104,7 +110,7 @@ namespace Passer.Humanoid {
public HeadTargetProps(SerializedObject serializedObject, HeadTarget headTarget)
: base(serializedObject, headTarget.unityXR, headTarget, nameof(HeadTarget.unityXR)) {
hmdProp = serializedObject.FindProperty(nameof(HeadTarget.unityXR) + ".hmd");
hmdProp = serializedObject.FindProperty(nameof(HeadTarget.unityXR) + ".sensorComponent");
}
public override void Inspector() {
@ -116,17 +122,18 @@ namespace Passer.Humanoid {
if (enabledProp.boolValue) {
EditorGUI.indentLevel++;
if (headTarget.unityXR.hmd == null) {
if (headTarget.unityXR.sensorComponent == null) {
// Hmd does not exist
using (new EditorGUILayout.HorizontalScope()) {
EditorGUILayout.LabelField("Hmd", GUILayout.Width(120));
if (GUILayout.Button("Show")) {
headTarget.unityXR.CheckSensor(headTarget);
//headTarget.unityXR.CheckSensor(headTarget);
headTarget.unityXR.CheckSensor(headTarget); //.GetSensorComponent();
}
}
}
else
hmdProp.objectReferenceValue = (UnityXRHmd)EditorGUILayout.ObjectField("Hmd", headTarget.unityXR.hmd, typeof(UnityXRHmd), true);
hmdProp.objectReferenceValue = (UnityXRHmd)EditorGUILayout.ObjectField("Hmd", headTarget.unityXR.sensorComponent, typeof(UnityXRHmd), true);
EditorGUI.indentLevel--;
}
else
@ -145,7 +152,7 @@ namespace Passer.Humanoid {
public HandTargetProps(SerializedObject serializedObject, HandTarget handTarget)
: base(serializedObject, handTarget.unityXR, handTarget, "unityXR") {
controllerProp = serializedObject.FindProperty("unityXR.controller");
controllerProp = serializedObject.FindProperty("unityXR.sensorComponent");
}
public override void Inspector() {

View File

@ -10,6 +10,7 @@ using Photon.Pun;
#endif
namespace Passer {
using Tracking;
using Humanoid;
[CanEditMultipleObjects]
@ -289,15 +290,6 @@ namespace Passer {
#if pUNITYXR
new UnityXR_Editor.TrackerProps(serializedObject, targetObjs, humanoid.unityXR),
#endif
//#if hOPENVR && (UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX)
// new OpenVR_Editor.TrackerProps(serializedObject, targetObjs, humanoid.openVR),
//#endif
//#if hSTEAMVR && UNITY_STANDALONE_WIN
// //new SteamVR_Editor.TrackerProps(serializedObject, targetObjs, humanoid.steamVR),
//#endif
//#if hOCULUS && (UNITY_STANDALONE_WIN || UNITY_ANDROID)
// new Oculus_Editor.TrackerProps(serializedObject, targetObjs, humanoid.oculus),
//#endif
#if hWINDOWSMR && UNITY_WSA_10_0
new WindowsMR_Editor.TrackerProps(serializedObject, targetObjs, humanoid.mixedReality),
@ -305,14 +297,11 @@ namespace Passer {
#if hWAVEVR
new WaveVR_Editor.TrackerProps(serializedObject, targetObjs, humanoid.waveVR),
#endif
#if hVRTK
new Vrtk_Editor.TrackerProps(serializedObject, targetObjs, humanoid.vrtk),
#endif
#if hHYDRA && (UNITY_STANDALONE_WIN || UNITY_WSA_10_0)
new Hydra_Editor.TrackerProps(serializedObject, targetObjs, humanoid.hydra),
#endif
#if hLEAP && (UNITY_STANDALONE_WIN || UNITY_WSA_10_0)
new LeapMotion_Editor.TrackerProps(serializedObject, targetObjs, humanoid.leapTracker),
new LeapMotion_Editor.TrackerProps(serializedObject, targetObjs, humanoid.leap),
#endif
#if hKINECT1 && (UNITY_STANDALONE_WIN || UNITY_WSA_10_0)
new Kinect1_Editor.TrackerProps(serializedObject, targetObjs, humanoid.kinect1),
@ -388,24 +377,11 @@ namespace Passer {
#region Animations
private SerializedProperty animatorParamForwardProp;
private SerializedProperty animatorParamSidewardProp;
private SerializedProperty animatorParamRotationProp;
private SerializedProperty animatorParamHeightProp;
private void InitAnimations(HumanoidControl humanoid) {
animatorParamForwardProp = serializedObject.FindProperty("animatorParameterForwardIndex");
animatorParamSidewardProp = serializedObject.FindProperty("animatorParameterSidewardIndex");
animatorParamRotationProp = serializedObject.FindProperty("animatorParameterRotationIndex");
animatorParamHeightProp = serializedObject.FindProperty("animatorParameterHeightIndex");
}
private void InitAnimations(HumanoidControl humanoid) { }
bool showAnimatorParameters = false;
private void AnimatorInspector(HumanoidControl humanoid) {
AnimatorControllerInspector(humanoid);
AnimatorParametersInspector(humanoid);
}
private void AnimatorControllerInspector(HumanoidControl humanoid) {
@ -434,44 +410,6 @@ namespace Passer {
EditorGUILayout.EndHorizontal();
}
private void AnimatorParametersInspector(HumanoidControl humanoid) {
if (showAnimatorParameters && humanoid.animatorEnabled && humanoid.targetsRig.runtimeAnimatorController != null) {
if (animatorParameterNames == null)
animatorParameterNames = GetAnimatorParameters(humanoid);
EditorGUI.indentLevel++;
GUIContent forwardSpeedText = new GUIContent(
"Forward Speed",
"Animator parameter controlling the forward motion animation"
);
animatorParamForwardProp.intValue = SetAnimatorInput(forwardSpeedText, animatorParamForwardProp.intValue, ref humanoid.animatorParameterForward);
GUIContent sidewardSpeedText = new GUIContent(
"Sideward Speed",
"Animator parameter controlling the sideward motion animation"
);
animatorParamSidewardProp.intValue = SetAnimatorInput(sidewardSpeedText, animatorParamSidewardProp.intValue, ref humanoid.animatorParameterSideward);
GUIContent turnSpeedText = new GUIContent(
"Turn Speed",
"Animator parameter controlling the rotation animation"
);
animatorParamRotationProp.intValue = SetAnimatorInput(turnSpeedText, animatorParamRotationProp.intValue, ref humanoid.animatorParameterRotation);
GUIContent headHeightText = new GUIContent(
"Head Height",
"Animation parameter controlling the squatting animation"
);
animatorParamHeightProp.intValue = SetAnimatorInput(headHeightText, animatorParamHeightProp.intValue, ref humanoid.animatorParameterHeight);
EditorGUI.indentLevel--;
}
else
showAnimatorParameters = false;
}
protected GUIContent[] animatorParameterNames;
public GUIContent[] GetAnimatorParameters(HumanoidControl humanoid) {
if (humanoid == null || humanoid.targetsRig.runtimeAnimatorController == null)
@ -723,6 +661,7 @@ namespace Passer {
CalibrateAtStartSetting();
StartPositionSetting();
ScalingSetting();
FloatCorrectionSetting();
DontDestroySetting();
if (IsPrefab(humanoid))
DisconnectInstancesSetting();
@ -781,6 +720,15 @@ namespace Passer {
scalingProp.intValue = (int)(HumanoidControl.ScalingType)EditorGUILayout.EnumPopup(text, (HumanoidControl.ScalingType)scalingProp.intValue);
}
protected void FloatCorrectionSetting() {
SerializedProperty floatCorrectionProp = serializedObject.FindProperty(nameof(HumanoidControl.floatCorrection));
GUIContent text = new GUIContent(
"Float Correction",
"Correct floating avatars when user is taller than the avatar"
);
floatCorrectionProp.boolValue = EditorGUILayout.Toggle(text, floatCorrectionProp.boolValue);
}
private void ShowTrackers(HumanoidControl humanoid, bool shown) {
foreach (Tracker tracker in humanoid.trackers)
tracker.ShowTracker(shown);
@ -907,6 +855,7 @@ namespace Passer {
else {
humanoid.pose.Show(humanoid);
humanoid.CopyRigToTargets();
humanoid.MatchTargetsToAvatar();
}
}
@ -1136,7 +1085,7 @@ namespace Passer {
private void RemoveControllers() {
foreach (HumanoidSensor sensor in tracker.sensors)
RemoveTransform(sensor.sensorTransform);
RemoveSensor(sensor.sensorComponent);
if (tracker.headSensor != null)
tracker.headSensor.RemoveController(headSensorProp);
@ -1152,11 +1101,16 @@ namespace Passer {
tracker.rightFootSensor.RemoveController(rightFootSensorProp);
}
private void RemoveTransform(Transform trackerTransform) {
if (trackerTransform != null)
DestroyImmediate(trackerTransform.gameObject, true);
private void RemoveSensor(Tracking.SensorComponent sensorComponent) {
if (sensorComponent != null)
DestroyImmediate(sensorComponent.gameObject, true);
}
//private void RemoveTransform(Transform trackerTransform) {
// if (trackerTransform != null)
// DestroyImmediate(trackerTransform.gameObject, true);
//}
private void SetSensors2Target() {
foreach (HumanoidSensor sensor in tracker.sensors) {
sensor.SetSensor2Target();

View File

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 363 B

View File

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 355 B

View File

@ -22,7 +22,8 @@ namespace Passer.Humanoid {
}
public static GameObject GetHumanoidPlayerPrefab(string prefabPath) {
GameObject prefab = PrefabUtility.LoadPrefabContents(prefabPath);
//GameObject prefab = PrefabUtility.LoadPrefabContents(prefabPath);
GameObject prefab = null;
return prefab;
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a7ce8a0ec51c72a4f8a8f33325b0c51e
guid: 875a66c1e6398184192242a8674906b3
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,143 @@
using UnityEngine;
#if hPHOTON2
using Photon.Pun;
#if hPUNVOICE2 && !UNITY_WEBGL
using Photon.Voice.PUN;
using Photon.Voice.Unity;
#endif
#endif
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Passer.Humanoid {
[InitializeOnLoad]
public class OnLoadHumanoidPlayerPun {
static OnLoadHumanoidPlayerPun() {
CheckHumanoidPlayer();
}
protected static void CheckHumanoidPlayerVoice() {
#if hPUNVOICE2
string prefabPath = OnLoadHumanoidPlayer.GetHumanoidPlayerPrefabPath();
prefabPath = prefabPath.Substring(0, prefabPath.Length - 21) + "HumanoidPlayerVoice.prefab";
GameObject playerVoicePrefab = OnLoadHumanoidPlayer.GetHumanoidPlayerPrefab(prefabPath);
if (playerVoicePrefab == null)
return;
bool hasChanged = false;
#if UNITY_WEBGL
PhotonView photonView = playerVoicePrefab.GetComponent<PhotonView>();
if (photonView == null) {
photonView = playerVoicePrefab.AddComponent<PhotonView>();
hasChanged = true;
}
#else
PhotonVoiceView photonVoiceView = playerVoicePrefab.GetComponent<PhotonVoiceView>();
if (photonVoiceView == null) {
photonVoiceView = playerVoicePrefab.AddComponent<PhotonVoiceView>();
hasChanged = true;
}
if (photonVoiceView.UsePrimaryRecorder == false) {
photonVoiceView.UsePrimaryRecorder = true;
hasChanged = true;
}
PhotonTransformView photonTransformView = playerVoicePrefab.GetComponent<PhotonTransformView>();
if (photonTransformView == null) {
photonTransformView = playerVoicePrefab.AddComponent<PhotonTransformView>();
hasChanged = true;
}
PhotonView photonView = playerVoicePrefab.GetComponent<PhotonView>();
if (photonView != null) {
// should always be there because of the photonVoiceView
if (photonView.ObservedComponents == null) {
photonView.ObservedComponents = new System.Collections.Generic.List<Component>();
photonView.ObservedComponents.Add(photonTransformView);
photonView.Synchronization = ViewSynchronization.UnreliableOnChange;
hasChanged = true;
}
}
//Speaker speaker = playerVoicePrefab.GetComponent<Speaker>();
//if (speaker == null) {
// speaker = playerVoicePrefab.AddComponent<Speaker>();
// photonVoiceView.SpeakerInUse = speaker;
// hasChanged = true;
// AudioSource audioSource = playerVoicePrefab.GetComponent<AudioSource>();
// if (audioSource != null) {
// Debug.Log("adjust rolloff");
// // default logaritmic only work when people are closer than 0.5m...
// audioSource.maxDistance = 5;
// }
//}
#endif
if (hasChanged)
OnLoadHumanoidPlayer.UpdateHumanoidPrefab(playerVoicePrefab, prefabPath);
#if !UNITY_WEBGL
CheckVoiceNetwork();
#endif
#endif
}
#if hPUNVOICE2 && !UNITY_WEBGL
protected static void CheckVoiceNetwork() {
NetworkingStarter networkingStarter = Object.FindObjectOfType<NetworkingStarter>();
if (networkingStarter == null)
return;
PhotonVoiceNetwork voiceNetwork = Object.FindObjectOfType<PhotonVoiceNetwork>();
if (voiceNetwork != null)
return;
GameObject voiceNetworkObject = new GameObject("Voice Network");
voiceNetwork = voiceNetworkObject.AddComponent<PhotonVoiceNetwork>();
Recorder voiceRecorder = voiceNetworkObject.AddComponent<Recorder>();
voiceRecorder.ReactOnSystemChanges = true;
voiceRecorder.TransmitEnabled = true;
voiceRecorder.SamplingRate = POpusCodec.Enums.SamplingRate.Sampling48000;
voiceNetwork.PrimaryRecorder = voiceRecorder;
}
#endif
public static void CheckHumanoidPlayer() {
#if hPHOTON1 || hPHOTON2
string prefabPath = OnLoadHumanoidPlayer.GetHumanoidPlayerPrefabPath();
GameObject playerPrefab = OnLoadHumanoidPlayer.GetHumanoidPlayerPrefab(prefabPath);
bool hasChanged = false;
#if hNW_PHOTON
if (playerPrefab != null) {
PhotonView photonView = playerPrefab.GetComponent<PhotonView>();
if (photonView == null) {
photonView = playerPrefab.AddComponent<PhotonView>();
photonView.ObservedComponents = new System.Collections.Generic.List<Component>();
#if hPHOTON2
photonView.Synchronization = ViewSynchronization.UnreliableOnChange;
#else
photonView.synchronization = ViewSynchronization.UnreliableOnChange;
#endif
HumanoidPlayer humanoidPun = playerPrefab.GetComponent<HumanoidPlayer>();
if (humanoidPun != null)
photonView.ObservedComponents.Add(humanoidPun);
hasChanged = true;
}
}
#else
if (playerPrefab != null) {
PhotonView photonView = playerPrefab.GetComponent<PhotonView>();
if (photonView != null)
Object.DestroyImmediate(photonView, true);
}
#endif
if (hasChanged)
OnLoadHumanoidPlayer.UpdateHumanoidPrefab(playerPrefab, prefabPath);
#endif
CheckHumanoidPlayerVoice();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 185ec4e1799d1ac4d867b69454f1cd0f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,108 @@
/*
using UnityEditor;
using UnityEngine;
using UnityEngine.Networking;
#if hNW_PHOTON
#if hPHOTON2
using Photon.Pun;
#endif
namespace Passer {
[CustomEditor(typeof(PhotonStarter))]
public class PunStarter_Editor : Editor {
public override void OnInspectorGUI() {
base.OnInspectorGUI();
HumanoidControl[] humanoids = FindObjectsOfType<HumanoidControl>();
if (humanoids.Length != 1)
// We only support sitatuation with one humanoid in the scene
return;
//HumanoidControl humanoid = humanoids[0];
if (Application.isPlaying)
return;
//GameObject humanoidPrefab = CheckHumanoidPrefab(humanoid);
//NetworkingComponentsInspectorPun(humanoid, humanoidPrefab);
}
//private GameObject CheckHumanoidPrefab(HumanoidControl humanoid) {
// GameObject humanoidPrefab = Resources.Load<GameObject>(humanoid.gameObject.name + "_generated");
// if (humanoidPrefab == null) {
// humanoidPrefab = PrefabUtility.CreatePrefab("Assets/Humanoid/Prefabs/Networking/Resources/" + humanoid.gameObject.name + "_generated.prefab", humanoid.gameObject);
// humanoidPrefab.gameObject.SetActive(true);
// }
// return humanoidPrefab;
//}
//private void UpdateHumanoidPrefab(HumanoidControl humanoid) {
// if (humanoid != null) {
// GameObject humanoidPrefab = Resources.Load<GameObject>(humanoid.gameObject.name + "_generated");
// if (humanoidPrefab != null && humanoid.gameObject != humanoidPrefab)
// PrefabUtility.ReplacePrefab(humanoid.gameObject, humanoidPrefab, ReplacePrefabOptions.ConnectToPrefab);
// }
//}
// private void NetworkingComponentsInspectorPun(HumanoidControl humanoid, GameObject humanoidPrefab) {
//#if hPHOTON1 || hPHOTON2
//#if hNW_PHOTON
// CheckPunStarter(humanoid, humanoidPrefab);
// PhotonView photonView = humanoid.GetComponent<PhotonView>();
// if (photonView == null)
// photonView = humanoid.gameObject.AddComponent<PhotonView>();
// photonView.ObservedComponents = new System.Collections.Generic.List<Component>();
// photonView.ObservedComponents.Add(humanoid);
//#else
// cleanupPhotonView = humanoid.GetComponent<PhotonView>();
//#endif
//#endif
// }
// private void CheckPunStarter(HumanoidControl humanoid, GameObject humanoidPrefab) {
// if (Application.isPlaying)
// return;
//#if hNW_PHOTON
// PhotonStarter photonStarter = FindObjectOfType<PhotonStarter>();
// if (photonStarter != null && humanoidPrefab != null && photonStarter.playerPrefab != humanoidPrefab) {
// Undo.RecordObject(photonStarter, "Updated Player Prefab");
// photonStarter.playerPrefab = humanoidPrefab;
// }
//#endif
// }
public void OnDisable() {
Cleanup();
}
#if hNW_UNET
private NetworkIdentity cleanupNetworkIdentity;
#endif
#if hPHOTON1 || hPHOTON2
private PhotonView cleanupPhotonView;
#endif
private GameObject cleanupPunStarter;
private void Cleanup() {
#if hNW_UNET
if (cleanupNetworkIdentity) {
DestroyImmediate(cleanupNetworkIdentity, true);
cleanupNetworkIdentity = null;
}
#endif
#if hPHOTON1 || hPHOTON2
if (cleanupPhotonView) {
DestroyImmediate(cleanupPhotonView, true);
cleanupPhotonView = null;
}
#endif
if (cleanupPunStarter) {
DestroyImmediate(cleanupPunStarter, true);
cleanupPunStarter = null;
}
}
}
}
#endif
*/

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e86563dd015c559479420645216c4a70
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -236,7 +236,13 @@ namespace Passer.Humanoid {
if (bones[i] == null || bones[i].bone == null || bones[i].bone.transform == null)
continue;
#if UNITY_2022_1_OR_NEWER
Handles.FreeMoveHandle(bones[i].bone.transform.position, 0.002F, Vector3.zero, DotHandleCapSaveID);
#else
Handles.FreeMoveHandle(bones[i].bone.transform.position, bones[i].bone.transform.rotation, 0.002F, Vector3.zero, DotHandleCapSaveID);
#endif
controlIds[i] = lastControlID;
boneIds[i] = bones[i].boneId;
}
@ -317,6 +323,6 @@ namespace Passer.Humanoid {
return;
}
#endregion
#endregion
}
}

View File

@ -33,7 +33,7 @@ namespace Passer {
private void InitEditors() {
allProps = new TargetProps[] {
#if hOPENVR && hVIVETRACKER && (UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX)
#if hVIVETRACKER
new ViveTracker_Editor.FootTargetProps(serializedObject, footTarget),
#endif
#if hKINECT1
@ -48,9 +48,9 @@ namespace Passer {
#if hORBBEC
new Astra_Editor.FootTargetProps(serializedObject, footTarget),
#endif
#if hNEURON
new Neuron_Editor.FootTargetProps(serializedObject, footTarget),
#endif
//#if hNEURON
// new Neuron_Editor.FootTargetProps(serializedObject, footTarget),
//#endif
#if hOPTITRACK
new Optitrack_Editor.FootTargetProps(serializedObject, footTarget),
#endif
@ -63,9 +63,9 @@ namespace Passer {
};
}
#endregion
#endregion
#region Disable
#region Disable
public void OnDisable() {
if (humanoid == null) {
// This target is not connected to a humanoid, so we delete it
@ -82,9 +82,9 @@ namespace Passer {
foreach (TargetProps props in allProps)
props.SetSensor2Target();
}
#endregion
#endregion
#region Inspector
#region Inspector
public override void OnInspectorGUI() {
if (footTarget == null || humanoid == null)
return;
@ -142,7 +142,7 @@ namespace Passer {
return foundHumanoid;
}
#region Sensors
#region Sensors
private static bool showControllers = true;
private void ControllerInspectors(FootTarget footTarget) {
showControllers = EditorGUILayout.Foldout(showControllers, "Controllers", true);
@ -157,9 +157,9 @@ namespace Passer {
EditorGUI.indentLevel--;
}
}
#endregion
#endregion
#region Configuration
#region Configuration
private void InitConfiguration(FootTarget footTarget) {
if (footTarget.humanoid.avatarRig == null)
return;
@ -200,7 +200,7 @@ namespace Passer {
UpdateToesBones(target.toes);
}
#region UpperLeg
#region UpperLeg
//private string upperLegXname;
//private SerializedProperty upperLegMinX;
//private SerializedProperty upperLegMaxX;
@ -276,9 +276,9 @@ namespace Passer {
//upperLeg.bone.maxAngles.z = upperLegMaxZ.floatValue;
}
#endregion
#endregion
#region LowerLeg
#region LowerLeg
//private string lowerLegYname;
//private SerializedProperty lowerLegMinX;
//private SerializedProperty lowerLegMaxX;
@ -326,9 +326,9 @@ namespace Passer {
//lowerLeg.bone.minAngles.x = lowerLegMinX.floatValue;
//lowerLeg.bone.maxAngles.x = lowerLegMaxX.floatValue;
}
#endregion
#endregion
#region Foot
#region Foot
//private string footXname;
//private SerializedProperty footMinX;
//private SerializedProperty footMaxX;
@ -390,9 +390,9 @@ namespace Passer {
//foot.bone.minAngles.z = footMinZ.floatValue;
//foot.bone.maxAngles.z = footMaxZ.floatValue;
}
#endregion
#endregion
#region Toes
#region Toes
//private string toesXname;
//private SerializedProperty toesMinX;
//private SerializedProperty toesMaxX;
@ -441,10 +441,10 @@ namespace Passer {
//toes.bone.maxAngles.x = toesMaxX.floatValue;
}
#endregion
#endregion
#endregion
#endregion
#region Settings
#region Settings
private SerializedProperty rotationSpeedLimitationProp;
private SerializedProperty slidePreventionProp;
@ -470,9 +470,9 @@ namespace Passer {
EditorGUI.indentLevel--;
}
}
#endregion
#endregion
#region Events
#region Events
protected SerializedProperty groundEventProp;
@ -534,11 +534,11 @@ namespace Passer {
// }
//}
#endregion
#endregion
#endregion
#endregion
#region Scene
#region Scene
public void OnSceneGUI() {
if (footTarget == null || humanoid == null)
@ -551,12 +551,13 @@ namespace Passer {
humanoid.pose.UpdatePose(humanoid);
else {
humanoid.pose.Show(humanoid);
footTarget.CopyRigToTarget();
humanoid.CopyRigToTargets();
humanoid.MatchTargetsToAvatar();
}
}
// update the target rig from the current foot target
footTarget.CopyTargetToRig();
humanoid.CopyTargetsToRig();
// update the avatar bones from the target rig
humanoid.UpdateMovements();
// match the target rig with the new avatar pose
@ -568,11 +569,11 @@ namespace Passer {
humanoid.UpdateSensorsFromTargets();
}
#endregion
#endregion
public abstract class TargetProps {
public SerializedProperty enabledProp;
public SerializedProperty sensorTransformProp;
public SerializedProperty sensorComponentProp;
public SerializedProperty sensor2TargetPositionProp;
public SerializedProperty sensor2TargetRotationProp;
@ -581,7 +582,7 @@ namespace Passer {
public TargetProps(SerializedObject serializedObject, LegSensor _sensor, FootTarget _footTarget, string unitySensorName) {
enabledProp = serializedObject.FindProperty(unitySensorName + ".enabled");
sensorTransformProp = serializedObject.FindProperty(unitySensorName + ".sensorTransform");
sensorComponentProp = serializedObject.FindProperty(unitySensorName + ".sensorComponent");
sensor2TargetPositionProp = serializedObject.FindProperty(unitySensorName + ".sensor2TargetPosition");
sensor2TargetRotationProp = serializedObject.FindProperty(unitySensorName + ".sensor2TargetRotation");
@ -592,11 +593,11 @@ namespace Passer {
}
public virtual void SetSensor2Target() {
if (sensor.sensorTransform == null)
if (sensor.sensorComponent == null)
return;
sensor2TargetRotationProp.quaternionValue = Quaternion.Inverse(sensor.sensorTransform.rotation) * footTarget.foot.target.transform.rotation;
sensor2TargetPositionProp.vector3Value = -footTarget.foot.target.transform.InverseTransformPoint(sensor.sensorTransform.position);
sensor2TargetRotationProp.quaternionValue = Quaternion.Inverse(sensor.sensorComponent.transform.rotation) * footTarget.foot.target.transform.rotation;
sensor2TargetPositionProp.vector3Value = -footTarget.foot.target.transform.InverseTransformPoint(sensor.sensorComponent.transform.position);
}
public abstract void Inspector();

View File

@ -44,17 +44,8 @@ namespace Passer.Humanoid {
#if pUNITYXR
new UnityXR_Editor.HandTargetProps(serializedObject, handTarget),
#endif
//#if hOPENVR && (UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX)
// new OpenVR_Editor.HandTargetProps(serializedObject, handTarget),
//#if hVIVETRACKER
// new ViveTracker_Editor.HandTargetProps(serializedObject, handTarget),
//#endif
//#endif
#if hSTEAMVR && UNITY_STANDALONE_WIN
//new SteamVR_Editor.HandTargetProps(serializedObject, handTarget),
#if hVIVETRACKER
//new ViveTracker_Editor.HandTargetProps(serializedObject, handTarget),
#endif
new ViveTracker_Editor.HandTargetProps(serializedObject, handTarget),
#endif
//#if hOCULUS && (UNITY_STANDALONE_WIN || UNITY_ANDROID)
// new Oculus_Editor.HandTargetProps(serializedObject, handTarget),
@ -65,9 +56,6 @@ namespace Passer.Humanoid {
#if hWAVEVR
new WaveVR_Editor.HandTargetProps(serializedObject, handTarget),
#endif
#if hVRTK
new Vrtk_Editor.HandTargetProps(serializedObject, handTarget),
#endif
#if hLEAP
new LeapMotion_Editor.HandTargetProps(serializedObject, handTarget),
#endif
@ -86,9 +74,9 @@ namespace Passer.Humanoid {
#if hORBBEC
new Astra_Editor.HandTargetProps(serializedObject, handTarget),
#endif
#if hNEURON
new Neuron_Editor.HandTargetProps(serializedObject, handTarget),
#endif
//#if hNEURON
// new Neuron_Editor.HandTargetProps(serializedObject, handTarget),
//#endif
#if hOPTITRACK
new Optitrack_Editor.HandTargetProps(serializedObject, handTarget),
#endif
@ -157,8 +145,6 @@ namespace Passer.Humanoid {
InteractionPointerButton(handTarget);
serializedObject.ApplyModifiedProperties();
//serializedObject.Update();
//serializedObject.ApplyModifiedProperties();
}
public static HandTarget Inspector(HandTarget handTarget, string name) {
@ -451,8 +437,8 @@ namespace Passer.Humanoid {
if (showSettings) {
EditorGUI.indentLevel++;
// Cannot use serializedPropery because showRealObjects is a getter/setter
bool showRealObjects = EditorGUILayout.Toggle("Show Real Objects", handTarget.showRealObjects);
SerializedProperty showObjectsProp = serializedObject.FindProperty("_showRealObjects");
bool showRealObjects = EditorGUILayout.Toggle("Show Real Objects", showObjectsProp.boolValue);
if (showRealObjects != handTarget.showRealObjects) {
handTarget.showRealObjects = showRealObjects;
handTarget.ShowSensors(showRealObjects, true);
@ -709,12 +695,13 @@ namespace Passer.Humanoid {
humanoid.pose.UpdatePose(humanoid);
else {
humanoid.pose.Show(humanoid);
handTarget.CopyRigToTarget();
humanoid.CopyRigToTargets();
humanoid.MatchTargetsToAvatar();
}
}
// update the target rig from the current hand target
handTarget.CopyTargetToRig();
humanoid.CopyTargetsToRig();
// update the avatar bones from the target rig
humanoid.UpdateMovements();
// match the target rig with the new avatar pose
@ -730,7 +717,8 @@ namespace Passer.Humanoid {
public abstract class TargetProps {
public SerializedProperty enabledProp;
public SerializedProperty sensorTransformProp;
//public SerializedProperty sensorTransformProp;
public SerializedProperty sensorComponentProp;
public SerializedProperty sensor2TargetPositionProp;
public SerializedProperty sensor2TargetRotationProp;
@ -739,7 +727,8 @@ namespace Passer.Humanoid {
public TargetProps(SerializedObject serializedObject, Humanoid.ArmSensor _sensor, HandTarget _handTarget, string unitySensorName) {
enabledProp = serializedObject.FindProperty(unitySensorName + ".enabled");
sensorTransformProp = serializedObject.FindProperty(unitySensorName + ".sensorTransform");
//sensorTransformProp = serializedObject.FindProperty(unitySensorName + ".sensorTransform");
sensorComponentProp = serializedObject.FindProperty(unitySensorName + ".sensorComponent");
sensor2TargetPositionProp = serializedObject.FindProperty(unitySensorName + ".sensor2TargetPosition");
sensor2TargetRotationProp = serializedObject.FindProperty(unitySensorName + ".sensor2TargetRotation");

View File

@ -34,10 +34,8 @@ namespace Passer.Humanoid {
#if pUNITYXR
new UnityXR_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
#if hSTEAMVR && UNITY_STANDALONE_WIN
#if hVIVETRACKER
//new ViveTracker_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
new ViveTracker_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
#if hWINDOWSMR && UNITY_WSA_10_0
new WindowsMR_Editor.HeadTargetProps(serializedObject, headTarget),
@ -45,9 +43,6 @@ namespace Passer.Humanoid {
#if hWAVEVR
new WaveVR_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
#if hVRTK
new Vrtk_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
#if hREALSENSE
new Realsense_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
@ -66,9 +61,9 @@ namespace Passer.Humanoid {
#if hOPTITRACK
new Optitrack_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
#if hNEURON
new Neuron_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
//#if hNEURON
// new Neuron_Editor.HeadTargetProps(serializedObject, headTarget),
//#endif
#if hTOBII
new Tobii_Editor.HeadTargetProps(serializedObject, headTarget),
#endif
@ -177,7 +172,7 @@ namespace Passer.Humanoid {
showControllers = EditorGUILayout.Foldout(showControllers, "Controllers", true);
if (showControllers) {
EditorGUI.indentLevel++;
FirstPersonCameraInspector(headTarget);
//FirstPersonCameraInspector(headTarget);
ScreenInspector(headTarget);
foreach (TargetProps props in allProps)
@ -280,7 +275,7 @@ namespace Passer.Humanoid {
if (headTarget.humanoid == null)
return;
SerializedProperty animatorProp = serializedObject.FindProperty(nameof(HeadTarget.headAnimator)+ "." +nameof(HeadTarget.headAnimator.enabled));
SerializedProperty animatorProp = serializedObject.FindProperty(nameof(HeadTarget.headAnimator) + "." + nameof(HeadTarget.headAnimator.enabled));
if (animatorProp != null && headTarget.humanoid.animatorEnabled) {
GUIContent text = new GUIContent(
@ -487,12 +482,13 @@ namespace Passer.Humanoid {
humanoid.pose.UpdatePose(humanoid);
else {
humanoid.pose.Show(humanoid);
headTarget.CopyRigToTarget();
humanoid.CopyRigToTargets();
humanoid.MatchTargetsToAvatar();
}
}
// update the target rig from the current head target
headTarget.CopyTargetToRig();
humanoid.CopyTargetsToRig();
// update the avatar bones from the target rig
humanoid.UpdateMovements();
// match the target rig with the new avatar pose
@ -509,7 +505,8 @@ namespace Passer.Humanoid {
public abstract class TargetProps {
public SerializedProperty enabledProp;
public SerializedProperty sensorTransformProp;
//public SerializedProperty sensorTransformProp;
public SerializedProperty sensorComponentProp;
public SerializedProperty sensor2TargetPositionProp;
public SerializedProperty sensor2TargetRotationProp;
@ -518,7 +515,7 @@ namespace Passer.Humanoid {
public TargetProps(SerializedObject serializedObject, HeadSensor _sensor, HeadTarget _headTarget, string unitySensorName) {
enabledProp = serializedObject.FindProperty(unitySensorName + ".enabled");
sensorTransformProp = serializedObject.FindProperty(unitySensorName + ".sensorTransform");
sensorComponentProp = serializedObject.FindProperty(unitySensorName + ".sensorComponent");
sensor2TargetPositionProp = serializedObject.FindProperty(unitySensorName + ".sensor2TargetPosition");
sensor2TargetRotationProp = serializedObject.FindProperty(unitySensorName + ".sensor2TargetRotation");
@ -529,11 +526,11 @@ namespace Passer.Humanoid {
}
public virtual void SetSensor2Target() {
if (sensor.sensorTransform == null)
if (sensor.sensorComponent == null)
return;
sensor2TargetRotationProp.quaternionValue = Quaternion.Inverse(sensor.sensorTransform.rotation) * headTarget.head.target.transform.rotation;
sensor2TargetPositionProp.vector3Value = -headTarget.head.target.transform.InverseTransformPoint(sensor.sensorTransform.position);
sensor2TargetRotationProp.quaternionValue = Quaternion.Inverse(sensor.sensorComponent.transform.rotation) * headTarget.head.target.transform.rotation;
sensor2TargetPositionProp.vector3Value = -headTarget.head.target.transform.InverseTransformPoint(sensor.sensorComponent.transform.position);
}
public abstract void Inspector();

View File

@ -32,7 +32,7 @@ namespace Passer {
private void InitEditors() {
allProps = new TargetProps[] {
#if hOPENVR && hVIVETRACKER && (UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX)
#if hVIVETRACKER
new ViveTracker_Editor.HipsTargetProps(serializedObject, hipsTarget),
#endif
#if hKINECT1
@ -47,9 +47,9 @@ namespace Passer {
#if hORBBEC
new Astra_Editor.HipsTargetProps(serializedObject, hipsTarget),
#endif
#if hNEURON
new Neuron_Editor.HipsTargetProps(serializedObject, hipsTarget),
#endif
//#if hNEURON
// new Neuron_Editor.HipsTargetProps(serializedObject, hipsTarget),
//#endif
#if hOPTITRACK
new Optitrack_Editor.HipsTargetProps(serializedObject, hipsTarget),
#endif
@ -276,12 +276,13 @@ namespace Passer {
humanoid.pose.UpdatePose(humanoid);
else {
humanoid.pose.Show(humanoid);
hipsTarget.CopyRigToTarget();
humanoid.CopyRigToTargets();
humanoid.MatchTargetsToAvatar();
}
}
// update the target rig from the current hips target
hipsTarget.CopyTargetToRig();
humanoid.CopyTargetsToRig();
// update the avatar bones to match the target rig
humanoid.UpdateMovements();
// match the target rig with the new avatar pose
@ -297,7 +298,8 @@ namespace Passer {
public abstract class TargetProps {
public SerializedProperty enabledProp;
public SerializedProperty sensorTransformProp;
//public SerializedProperty sensorTransformProp;
public SerializedProperty sensorComponentProp;
public SerializedProperty sensor2TargetPositionProp;
public SerializedProperty sensor2TargetRotationProp;
@ -306,7 +308,8 @@ namespace Passer {
public TargetProps(SerializedObject serializedObject, TorsoSensor _sensor, HipsTarget _hipsTarget, string unitySensorName) {
enabledProp = serializedObject.FindProperty(unitySensorName + ".enabled");
sensorTransformProp = serializedObject.FindProperty(unitySensorName + ".sensorTransform");
//sensorTransformProp = serializedObject.FindProperty(unitySensorName + ".sensorTransform");
sensorComponentProp = serializedObject.FindProperty(unitySensorName + ".sensorComponent");
sensor2TargetPositionProp = serializedObject.FindProperty(unitySensorName + ".sensor2TargetPosition");
sensor2TargetRotationProp = serializedObject.FindProperty(unitySensorName + ".sensor2TargetRotation");
@ -317,11 +320,11 @@ namespace Passer {
}
public virtual void SetSensor2Target() {
if (sensor.sensorTransform == null)
if (sensor.sensorComponent == null)
return;
sensor2TargetRotationProp.quaternionValue = Quaternion.Inverse(sensor.sensorTransform.rotation) * hipsTarget.hips.target.transform.rotation;
sensor2TargetPositionProp.vector3Value = -hipsTarget.hips.target.transform.InverseTransformPoint(sensor.sensorTransform.position);
sensor2TargetRotationProp.quaternionValue = Quaternion.Inverse(sensor.sensorComponent.transform.rotation) * hipsTarget.hips.target.transform.rotation;
sensor2TargetPositionProp.vector3Value = -hipsTarget.hips.target.transform.InverseTransformPoint(sensor.sensorComponent.transform.position);
}
public abstract void Inspector();

View File

@ -7,7 +7,8 @@
"PhotonVoice",
"PhotonVoice.PUN",
"PhotonRealtime",
"PhotonVoice.API"
"PhotonVoice.API",
"SteamVR"
],
"includePlatforms": [
"Editor"

View File

@ -12,7 +12,7 @@ using UnityEditor;
namespace Passer {
[CustomEditor(typeof(Possessable))]
public class Possession_Editor : Editor {
public class Possessable_Editor : Editor {
protected Possessable possession;
@ -49,9 +49,9 @@ namespace Passer {
AssetImporter assetImporter = AssetImporter.GetAtPath(possession.assetPath);
if (assetImporter != null)
// HACK: force avatars to avatarhops because we cannot change assetbundle in package prefabs
assetImporter.assetBundleName = ""; // "possessions"; //activeScene.name + "_possessions";
assetImporter.assetBundleName = activeScene.name + "_possessions";
//Debug.Log(possession.gameObject + ": Set AssetBundleName to " + assetImporter.assetBundleName);
Debug.Log(possession.gameObject + ": Set AssetBundleName to " + assetImporter.assetBundleName + " - " + possession.siteLocation);
return;
}
@ -62,8 +62,8 @@ namespace Passer {
string scenePath = activeScene.path;
AssetImporter assetImporter = AssetImporter.GetAtPath(possession.assetPath);
// HACK: force avatars to avatarhops because we cannot change assetbundle in package prefabs
assetImporter.assetBundleName = ""; //"possessions"; //activeScene.name + "_possessions";
//Debug.Log(possession.gameObject + ": Set AssetBundleName to " + assetImporter.assetBundleName);
assetImporter.assetBundleName = activeScene.name + "_possessions";
Debug.Log(possession.gameObject + ": Set AssetBundleName to " + assetImporter.assetBundleName + " - " + possession.siteLocation);
}
}

View File

@ -15,6 +15,7 @@ namespace Passer {
/// by selecting the appropriate sites in the dialog:
///
/// \image html BuildSitesDialog.png
/// \image rtf BuildSitesDialog.png
///
/// When the Build button is pressed, all sites will be build and become available in the Assets/SiteBuilds folder
/// with a submap for each platform (like Windows, Android...)
@ -81,6 +82,8 @@ namespace Passer {
bool hasChanged = false;
for (int i = 0; i < assetbundles.Length; i++) {
PrepareSite(assetbundles[i]);
Sites.SiteBuild siteBuild = siteBuilds.list.Find(sb => sb.siteName == assetbundles[i]);
if (siteBuild == null) {
siteBuild = new Sites.SiteBuild() {
@ -95,6 +98,21 @@ namespace Passer {
AssetDatabase.SaveAssets();
}
private static void PrepareSite(string sitename) {
string[] paths = AssetDatabase.GetAssetPathsFromAssetBundleAndAssetName(sitename, sitename);
if (paths.Length == 0)
return;
Scene scene = UnityEditor.SceneManagement.EditorSceneManager.OpenScene(paths[0]);
if (scene == null) {
Debug.Log("Could not load " + sitename);
return;
}
Debug.Log("Prepare " + sitename);
NetworkObject_Check.CheckNetworkObjects();
UnityEditor.SceneManagement.EditorSceneManager.SaveScene(UnityEngine.SceneManagement.SceneManager.GetActiveScene());
}
private static void StartBuildToFolder() {
string savePath = EditorUtility.SaveFolderPanel("Target folder", "", "");
BuildSites(savePath);

View File

@ -4,6 +4,7 @@ using UnityEngine;
namespace Passer {
using Humanoid;
[CanEditMultipleObjects]
[CustomEditor(typeof(Handle), true)]
public class Handle_Editor : Editor {
@ -42,9 +43,14 @@ namespace Passer {
//if (HumanoidPreferences.help)
// EditorGUILayout.HelpBox("Component to specify behaviour when grabbing the GameObject", MessageType.None);
handle.hand = (Handle.Hand)EditorGUILayout.EnumPopup("Hand", handle.hand);
handle.grabType = (Handle.GrabType)EditorGUILayout.EnumPopup("Grab type", handle.grabType);
handle.range = EditorGUILayout.FloatField("Range", handle.range);
SerializedProperty handProp = serializedObject.FindProperty(nameof(Handle.hand));
handProp.intValue = (int)(Handle.Hand)EditorGUILayout.EnumPopup("Hand", (Handle.Hand)handProp.intValue);
SerializedProperty grabTypeProp = serializedObject.FindProperty(nameof(Handle.grabType));
grabTypeProp.intValue = (int)(Handle.GrabType)EditorGUILayout.EnumPopup("Grab type", (Handle.GrabType)grabTypeProp.intValue);
SerializedProperty rangeProp = serializedObject.FindProperty(nameof(Handle.range));
rangeProp.floatValue = EditorGUILayout.FloatField("Range", rangeProp.floatValue);
HandPoseInspector(handle);
CheckHandTarget(handle);

View File

@ -4,7 +4,7 @@ using UnityEngine;
namespace Passer {
using Humanoid;
[CustomEditor(typeof(ControllerInput))]
[CustomEditor(typeof(ControllerInput), true)]
public class ControllerInput_Editor : Editor {
protected ControllerInput controllerInput;

View File

@ -1,5 +1,6 @@
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;
#if UNITY_2021_2_OR_NEWER
using UnityEditor.SceneManagement;
#else
@ -10,14 +11,26 @@ namespace Passer {
[InitializeOnLoad]
public class NetworkObject_Check {
public int callbackOrder => 0;
public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report) {
CheckNetworkObjects();
}
/// <summary>Check if this gameObject has the right network transform code</summary>
static NetworkObject_Check() {
CheckNetworkObjects();
}
public static void CheckNetworkObjects() {
NetworkObject[] networkObjects = Object.FindObjectsOfType<NetworkObject>();
foreach (NetworkObject networkObject in networkObjects)
CheckForNetworkObject(networkObject.gameObject);
}
public static void CheckForNetworkObject(GameObject gameObject) {
CheckNetworkObjectNone(gameObject);
CheckNetworkObjectUnet(gameObject);
@ -98,6 +111,13 @@ namespace Passer {
Photon.Pun.PhotonView photonView = gameObject.GetComponent<Photon.Pun.PhotonView>();
if (photonView == null)
photonView = gameObject.AddComponent<Photon.Pun.PhotonView>();
if (photonView.ViewID == 0) {
NetworkObject networkObject = gameObject.GetComponent<NetworkObject>();
if (networkObject != null && networkObject.objectIdentity != 0)
photonView.ViewID = (int)networkObject.objectIdentity;
else
Photon.Pun.PhotonNetwork.AllocateViewID(photonView);
}
Photon.Pun.PhotonTransformView transformView = gameObject.GetComponent<Photon.Pun.PhotonTransformView>();
if (transformView == null) {

Binary file not shown.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: bfe80b67437fde040b2ebc0b9cb73a15
guid: 53c8571aa9e542643b485a80320a9a70
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4465d1dbeab5b4e48a3b1a5a237ce59a
guid: ef89ebf080626664e9353fa0565b680e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,22 +1,24 @@
Installation
============
Import this package in Unity directlywith the Package Manager git package importer
You can import the Humanoid Control Free package in Unity directly with the Package Manager git package importer.
See [Unity: Installing from a Git URL](https://docs.unity3d.com/Manual/upm-ui-giturl.html)
Use the link from 'Clone with HTTP' (for example: https://http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free.git)
In this way you can always retrieve the latest version by pressing the Update button in the Package Manager.
Use the link from 'Clone with HTTP' (for example: https://git.passer.life/HumanoidControl/HumanoidControl_Free.git)
In this way you can always retrieve the latest version by pressing the `Update` button in the Package Manager.
Optionally, you can use a tag to retrieve a specific version. For example:http://gitlab.passervr.com/passer/unity/humanoidcontrol4_free.git#4.1.0.
Optionally, you can use a tag to retrieve a specific version. For example:https://git.passer.life/HumanoidControl/HumanoidControl_Free.git#4.1.0.
This will give you a stable version which does not change. Updating can be done by retrieving the package with a link to a new release.
ChangeLog and Releases
======================
You will find all releases with links which can be used in the Unity Package Manager here: https://gitlab.passervr.com/passer/unity/humanoidcontrol4_free/-/releases
All releases with UnityPackages and links for the Unity Package Manager: [Tags page](https://git.passer.life/HumanoidControl/HumanoidControl_Free/tags).
An RSS/Atom feed with all releases can be found on the [Tags page](https://git.passer.life/HumanoidControl/HumanoidControl_Free/tags). Click on the _RSS Feed_ icon in the top-right corner to retrieve the feed.
Documentation
=============
See [PasserVR HumanoidControl Documentation](https://passervr.com/apis/HumanoidControl/Unity/index.html)
For the latest version of the documentation, see [PasserVR HumanoidControl Documentation](https://docs.humanoidcontrol.com/)
Video
=====

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7fb2df2e4831fc94782d95487f732d65
guid: 9bd4d529ee013784db3923a2bdbc5bef
TextScriptImporter:
externalObjects: {}
userData:

View File

@ -11,6 +11,7 @@ namespace Passer.Humanoid {
/// The preferences can be accessed by the Edit->Preferences... menu.
///
/// \image html HumanoidPreferences.png
/// \image rtf HumanoidPreferences.png
///
/// * SteamVR Support, enables support for SteamVR devices beyound Unity XR (VR, Plus, Pro)
/// * Vive Tracker Support, enables support for Vive Trackers (Plus, Pro)

Some files were not shown because too many files have changed in this diff Show More