-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSCQuery support #958
base: main
Are you sure you want to change the base?
OSCQuery support #958
Conversation
I'm in pain |
@@ -100,6 +102,8 @@ class VRServer @JvmOverloads constructor( | |||
|
|||
init { | |||
// UwU | |||
instance = this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what was the reason this was moved to the start instead of waiting for everything to initialize and then let instance be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was for referencing vrserver as latestart or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update osc to 0.9 please 🥺
"[VMCHandler] Error listening to the port " + | ||
portIn + | ||
": " + | ||
e, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why, why return to monke
"[VMCHandler] Error listening to the port " + | |
portIn + | |
": " + | |
e, | |
"[VMCHandler] Error listening to the port $portIn: $e", |
"[VMCHandler] Sending to port " + | ||
portOut + | ||
" at address " + | ||
address, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😭
"[VMCHandler] Sending to port " + | |
portOut + | |
" at address " + | |
address, | |
"[VMCHandler] Sending to port $portOut at address $address", |
"[VMCHandler] Error connecting to port " + | ||
portOut + | ||
" at the address " + | ||
address + | ||
": " + | ||
e, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔪
"[VMCHandler] Error connecting to port " + | |
portOut + | |
" at the address " + | |
address + | |
": " + | |
e, | |
"[VMCHandler] Error connecting to port $portOut at the address $address: $e", |
val boneType = unityBone.boneType | ||
if (boneType != null) { | ||
// Get SlimeVR bone | ||
val bone = humanPoseManager.getBone(boneType) | ||
|
||
// Update unity hierarchy from bone's global | ||
// rotation | ||
outputUnityArmature!! | ||
.setGlobalRotationForBone( | ||
unityBone, | ||
bone.getGlobalRotation().times(bone.rotationOffset.inv()), | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WHY IS THE CODE GETTING WORST
val boneType = unityBone.boneType | |
if (boneType != null) { | |
// Get SlimeVR bone | |
val bone = humanPoseManager.getBone(boneType) | |
// Update unity hierarchy from bone's global | |
// rotation | |
outputUnityArmature!! | |
.setGlobalRotationForBone( | |
unityBone, | |
bone.getGlobalRotation().times(bone.rotationOffset.inv()), | |
) | |
} | |
val boneType = unityBone.boneType ?: continue | |
// Get SlimeVR bone | |
val bone = humanPoseManager.getBone(boneType) | |
// Update unity hierarchy from bone's global | |
// rotation | |
outputUnityArmature!! | |
.setGlobalRotationForBone( | |
unityBone, | |
bone.getGlobalRotation() * bone.rotationOffset.inv(), | |
) |
val upperLegsAverage = outputUnityArmature | ||
?.getHeadNodeOfBone(UnityBone.LEFT_UPPER_LEG) | ||
?.worldTransform | ||
?.translation | ||
?.plus( | ||
outputUnityArmature!!.getHeadNodeOfBone(UnityBone.RIGHT_UPPER_LEG)!!.worldTransform | ||
.translation, | ||
)?.times(0.5f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💀
OSCQuery allows VRChat's ports and address to be automatically detected.
It also allows SlimeVR to advertise that it wants head and controller data and for VRChat to send it to us.