Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
spoerri reto - rspoerri
NetXr
Commits
2cf277d7
Commit
2cf277d7
authored
Jun 01, 2018
by
Reto Spoerri - WorkPC
Browse files
added TODO's to scripts
parent
592bfc02
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
NetXr-UnityProject/Assets/NetXr-Examples/02_Beta/LargeSample/Scenes/NetXr-Example.unity
deleted
100644 → 0
View file @
592bfc02
This diff is collapsed.
Click to expand it.
NetXr-UnityProject/Assets/NetXr-Examples/02_Beta/LargeSample/Scenes/NetXr-Example.unity.meta
deleted
100644 → 0
View file @
592bfc02
fileFormatVersion: 2
guid: 0519b500ff82f45b6ad38179851249e4
timeCreated: 1490218335
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
NetXr-UnityProject/Assets/NetXr-Examples/Scripts/VrHandController.cs
View file @
2cf277d7
...
...
@@ -93,6 +93,11 @@ public enum ACTION {
Grab
}
/// <summary>
/// TODO: currently only one hands finger angle is transmitted, i think this is a unity bug when multiple scripts of the same type to rpc's
/// would need to merge both hands into one script i think...
/// </summary>
public
class
VrHandController
:
NetworkBehaviour
{
public
InputDeviceHand
handedness
;
...
...
NetXr-UnityProject/Assets/NetXr/Scripts/UnityIK.cs
View file @
2cf277d7
...
...
@@ -32,11 +32,12 @@ namespace NetXr {
void
Start
()
{
anim
=
gameObject
.
GetComponent
<
Animator
>();
playerPhysics
=
gameObject
.
GetComponentInParent
<
PlayerPhysics
>();
// is a local player
if
(
playerPhysics
!=
null
)
{
// is a local player
vrCameraTransform
=
gameObject
.
transform
.
parent
.
parent
;
}
else
{
// is a remote player
}
// is a remote player
else
{
vrCameraTransform
=
gameObject
.
transform
.
parent
;
}
}
...
...
@@ -61,7 +62,10 @@ namespace NetXr {
anim
.
SetIKPositionWeight
(
AvatarIKGoal
.
LeftFoot
,
ikWeight
);
anim
.
SetIKPositionWeight
(
AvatarIKGoal
.
RightFoot
,
ikWeight
);
// it's a local player
if
(
playerPhysics
!=
null
)
{
// TODO: position the feet, would actually be needed to be transferred by network as well (equally to the hands)
Quaternion
forwardVector
=
Quaternion
.
Euler
(
new
Vector3
(
0
,
vrCameraTransform
.
rotation
.
eulerAngles
.
y
,
0
));
anim
.
SetIKPosition
(
AvatarIKGoal
.
LeftFoot
,
new
Vector3
(
vrCameraTransform
.
position
.
x
,
playerPhysics
.
transform
.
position
.
y
,
vrCameraTransform
.
position
.
z
)
+
forwardVector
*
leftFootOffset
);
anim
.
SetIKPosition
(
AvatarIKGoal
.
RightFoot
,
new
Vector3
(
vrCameraTransform
.
position
.
x
,
playerPhysics
.
transform
.
position
.
y
,
vrCameraTransform
.
position
.
z
)
+
forwardVector
*
rightFootOffset
);
...
...
NetXr-UnityProject/ProjectSettings/ProjectSettings.asset
View file @
2cf277d7
...
...
@@ -17,7 +17,7 @@ PlayerSettings:
defaultCursor
:
{
fileID
:
0
}
cursorHotspot
:
{
x
:
0
,
y
:
0
}
m_SplashScreenBackgroundColor
:
{
r
:
0.13725491
,
g
:
0.12156863
,
b
:
0.1254902
,
a
:
1
}
m_ShowUnitySplashScreen
:
0
m_ShowUnitySplashScreen
:
1
m_ShowUnitySplashLogo
:
1
m_SplashScreenOverlayOpacity
:
1
m_SplashScreenAnimation
:
1
...
...
@@ -262,6 +262,9 @@ PlayerSettings:
m_Devices
:
-
Oculus
-
OpenVR
-
m_BuildTarget
:
iOS
m_Enabled
:
1
m_Devices
:
[]
m_BuildTargetEnableVuforiaSettings
:
[]
openGLRequireES31
:
0
openGLRequireES31AEP
:
0
...
...
@@ -399,6 +402,7 @@ PlayerSettings:
switchAllowsRuntimeAddOnContentInstall
:
0
switchDataLossConfirmation
:
0
switchSupportedNpadStyles
:
3
switchNativeFsCacheSize
:
32
switchSocketConfigEnabled
:
0
switchTcpInitialSendBufferSize
:
32
switchTcpInitialReceiveBufferSize
:
64
...
...
ignore.conf
View file @
2cf277d7
...
...
@@ -11,4 +11,9 @@ Builds
/.
git
/
objects
/.
git
/
logs
/.
git
/
hooks
/.
git
/
sourcetreeconfig
/.
git
/
index
/.
git
/
FETCH_HEAD
/.
git
/
COMMIT_EDITMSG
.
gitignore
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment