-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathNexusVRCharacterModelLoader.server.luau
118 lines (100 loc) · 4.71 KB
/
NexusVRCharacterModelLoader.server.luau
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
--Loads Nexus VR Character Model.
--GitHub: TheNexusAvenger/Nexus-VR-Character-Model
local Configuration = {
Appearance = {
--Transparency of the character when in first person.
LocalCharacterTransparency = 0.5,
--If true, arms will be allowed to disconnect.
--Recommended to be true locally so that the controllers match the hands,
--and false for other players so that arms appear normal.
LocalAllowArmDisconnection = true,
NonLocalAllowArmDisconnection = true,
--Maximum angle the neck can turn before the torso turns.
MaxNeckRotation = math.rad(35),
MaxNeckSeatedRotation = math.rad(60),
--Maximum angle the neck can tilt before the torso tilts.
MaxNeckTilt = math.rad(60),
--Maximum angle the center of the torso can bend.
MaxTorsoBend = math.rad(10),
},
Camera = {
--Options for the camera that can be enabled by the user.
EnabledCameraOptions = {
"Default",
"ThirdPersonTrack",
--"Disabled", --Behavior depends on Workspace.CurrentCamera.HeadLocked! When false, the camera will not move. When true, the camera will move with the headset.
},
--Default camera option.
DefaultCameraOption = "Default",
--If true, Workspace.CurrentCamera.HeadLocked will be locked to false.
--A Roblox engineer requested keeping HeadLocked on (DisableHeadLocked = false). To keep backwards compatibility, this defaults to true.
DisableHeadLocked = false,
--Disables FadeOutViewOnCollision (black screen when in parts).
--This is provided as a workaround for games where this is a problem. Only enable if players are complaining.
DisableFadeOutViewOnCollision = false,
},
Movement = {
--Movement methods that can be enabled by the user.
EnabledMovementMethods = {
"Teleport",
"SmoothLocomotion",
--"None", --Disables controls but still allows character updates. Intended for stationary games or momentarily freezing players.
},
--Default movement method.
DefaultMovementMethod = "Teleport",
--Blur effect for snap turning and teleports.
SnapTeleportBlur = true,
},
Menu = {
--If true, a gesture will be active for opening
--the Nexus VR Character Model menu. If you manually
--set this to false, you will lock players from being
--able to change camera options, movement options,
--recallibration, and chat.
MenuToggleGestureActive = true,
},
Output = {
--To suppress warnings from Nexus VR Character Model
--where supported (missing configuration entries),
--the names of the warnings can be added here.
--Add "All" to suppress all warnings.
SuppressWarnings = {},
--If true, clients can check the client output to see
--if Nexus VR Character Model is loaded. In order for
--the message to appear, the client must hold down Ctrl
--(left or right) when opening the F9 developer console.
AllowClientToOutputLoadedMessage = true,
},
Extra = {
--If true, Nexus VR Backpack (https://github.com/TheNexusAvenger/Nexus-VR-Backpack)
--will be inserted into the game and loaded. This replaces
--the default Roblox backpack.
NexusVRBackpackEnabled = true,
--If true, version information will be hidden on the client.
--Version information may be detectable based on behavior, or by exploiters decompiling
--the client code.
HideVersion = false,
--If true, Enigma (https://github.com/TheNexusAvenger/Enigma) will be enabled
--to allow players to use additional SteamVR trackers.
--It is only recommended to disable if this causes problems, and said problems
--can't be addressed.
EnigmaEnabled = true,
--If true, Nexus-Appendage with IKControl will be used.
--Workspace.IKControlConstraintSupport MUST be set to Enabled for proper results.
--In Team Create, it may not set correctly. Make sure to close and re-open
--Roblox Studio to verify it was set. Once this property defaults to Enabled
--or is removed, this setting will go away.
TEMPORARY_UseIKControl = false,
},
}
--Load the Nexus VR Character Model module.
local NexusVRCharacterModelModule
local MainModule = script:FindFirstChild("MainModule")
if MainModule then
NexusVRCharacterModelModule = require(MainModule)
else
NexusVRCharacterModelModule = require(10728814921)
end
--Load Nexus VR Character Model.
NexusVRCharacterModelModule:SetConfiguration(Configuration)
NexusVRCharacterModelModule:Load()