#🥽┃virtual-reality

1 messages · Page 1 of 1 (latest)

north path
#

Generate an store ready manifest file with the oculus integration asset.
If you don't have this in your project, you can generate the manifest in a second project and then reimport it

#

@wet jewel

wet jewel
wet jewel
#

BTW if you mean by going to Oculus > Tools > Create store-compatible AndroidManifest.xml , I already did that

balmy locust
#

The manifest also normally includes a list of what 'Activities' an Android app includes, but for a Unity app there is just one. It includes other stuff like the app's name, configuration for deep linking..etc.

#

This page looks helpful for configuring manifests from within Unity... normally if you were making an Android app, you would just edit the file in a text editor, but Unity helps you generate it from a template that you can edit, as well as generating it based on your Player settings. https://docs.unity3d.com/Manual/android-manifest.html

#

(was that totally confusing?)

north path
wet jewel
wet jewel
#

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
<application android:label="@string/app_name" android:icon="@mipmap/app_icon" android:allowBackup="false">
<activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:launchMode="singleTask" android:name="com.unity3d.player.UnityPlayerActivity" android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only" />
</application>
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
</manifest>

#

this is the manifest, oculus plugin generated for me, I don't see any permission over here

balmy locust
#

You are going to have to do a little bit of sleuthing.

wet jewel
north path
#

Do you have il2cpp and 64 bit enabled in player settings @wet jewel

#

It also shows something sbout thay

#

And check for any camera checks, but don't think they are in settings for android

wet jewel
balmy locust
# wet jewel Okay, so I followed your lead, I totally understand now that while building apk ...

you probably already saw this: https://docs.unity3d.com/2022.1/Documentation/Manual/android-permissions-declare.html. I suspect what 'Oculus > Tools > create store-compatible manifest' does is create a manifest template. I'm surprised its not working. You might have luck creating one by hand. I've never done it. https://docs.unity3d.com/2022.1/Documentation/Manual/overriding-android-manifest.html#creating-a-template-android-manifest-file

#

(I doubt my google fu is any better than yours, but maybe those links help...)

covert ruin
#

hey im extremely new to unity and im trying to build a vr game for the quest. When it finishes building its not in the location i wanted specified and when i try to upload the file to sidequest it tells me that it doesnt exist. help.

fiery scaffold
#

Hi all, I’m trying to have the player in VR move to another location (or temporarily move camera) within the same scene using either a controller or UI button. This is to provide the player with a temporary top down perspective for reference (yes in VR i know!) and then return to the main.

I’ve made several attempts and approaches to doing this but my beginner skills have not managed to get anything working after countless hours youtube/googling maybe someone can point out the obvious or the right direction. So far my approaches have mostly been towards transforming the XR rig to a location or duplicating it in another location and creating a enable/disable switch for the two XR sets. One approach of transforming the xr rig ended up with my controllers disjointed from my camera view!

torpid ginkgo
#

@dense roost Don't cross-post

dense roost
#

sorry, I saw that in here noone was answering and forgot to remove the post

dense roost
covert ruin
#

im building the apk file to my desktop

dense roost
#

have you tried the build and run or it does not work?

covert ruin
#

doesnt work either way

#

my error

dense roost
#

just those 2 errors?

covert ruin
#

yeah

dense roost
#

strange, I usually get more when something doesnt work

#

what version of unity are you using?

covert ruin
#

2021.3.6f1

dense roost
#

that's strange that trying to build for android in 2021.3.6f1 you don't get the gradle thing error. Guess they fixed it, but try this just in case: https://www.youtube.com/watch?v=RVtAD_q0Jtw

Unity 2021.3.6f1 and other Unity versions get the error when building to Android Devices:
"FileNotFoundException: Failed to find $C:/Program Files/Unity/Hub/Editor/2021.3.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\GradleTemplates\mainTemplate.gradle"

In this video, I will show you how to fix this issue to build to your Android.

Origin...

▶ Play video
#

the thing that surprises me is that you dont get the "dilenotfoundexception: failed to..." error

#

did that solve it...? @covert ruin

covert ruin
#

i thank you!

dense roost
#

no problem

vagrant sparrow
#

If u use openxr, you dont need a head set. There is a simulator

fiery scaffold
#

Hello. Noob here. How would I script the input for a VR controller secondary button? Essentially I'm trying to do the same as the video below but with an XR controller in place of "Input.GetMouseButtonDown" https://youtu.be/xmhm5jGwonc?t=158

Hi everyone! 🙂 Today I will show how to teleport the player and other objects in Unity. I will also show why it sometimes won't work for your player character and how to fix it.

Learn C# here: https://www.youtube.com/watch?v=HB1aPYPPJ24&list=PL0eyrZgxdwhxD9HhtpuZV22KxEJAZ55X-&ab_channel=DaniKrossing
Download Unity here: https://unity3d.com/get-...

▶ Play video
#

I also tried implementing with the XRI default input I have set up but the code did not work (again total beginner!)

#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class SnapTeleport : MonoBehaviour
{
public InputActionReference toggleReference = null;

private void Awake()
{
    toggleReference.action.started += Toggle;
}

private void OnDestroy()
{
    toggleReference.action.started -= Toggle;
}
private void Toggle(InputAction.CallbackContext context)
{
    // grab current position = (assign) new position
    gameObject.transform.position = new Vector3(1000f, 1000f, 1000f);
}

}

#

The above script with function (bottom) was assigned to a gameobject referencing XR secondary button

buoyant jolt
# fiery scaffold Hello. Noob here. How would I script the input for a VR controller secondary but...

A couple of thoughts, the first item is not all controllers and headsets have a secondary button - so make sure you actually want to use it that way. Additionally, contrary to the XRI examples, some buttons (i.e. thumbstick) operates different for platforms as well. On some platforms (i.e. Pico) it operates as a 2D axis only, and on-touch will only work for other platforms (i.e. Quest and Vive). So, always aim for the simplest cross-platform input set. Additionally, a lot of the XRI input systems don't seem to work with certain platforms depending on your Unity version (i.e. not registering controller input for vive).

What you posted looks like it would work for whatever you configured the Action button to, provided that script is sitting on the XR rig base.

If you want to get deeper, create three scripts:

  • XR2DInput
  • XR3DInput
  • XRButtonInput

And base on it InputFeatureUsage. That will let you pull any button, any movement, and any touch without going through XRI at all and decide what you want to do with.

fiery scaffold
buoyant jolt
woeful sentinel
#

Hi, guyz can any1 tell me how to enable full screen for my app?

#

It runs by default in a windowed mode. I read that I have to go to the XR Plugin Management and set Oculus Quest support as marked. I did but it didn't help.

buoyant jolt
#

You also need a custom AndroidManifest

woeful sentinel
#

@buoyant jolt thank you for pointing that out ❤️. Do you know where can I find generated AndroidManifest? It should be under Temp/StagingArea but its not there. I know that I have to put edited one into the plugins but there is no place where I can copy it from so it can be merged well

buoyant jolt
#

The oculus plugin can generate one but

buoyant jolt
# woeful sentinel <@229302061840203786> thank you for pointing that out ❤️. Do you know where can ...

This will work for Oculus, and Pico

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:installLocation="preferExternal" android:versionName="1.0" android:versionCode="1">
  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
  <application android:theme="@style/UnityThemeSelector" android:icon="@drawable/app_icon" android:label="@string/app_name">
    <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    </activity>
    <meta-data android:name="pvr.app.type" android:value="vr" />
    <meta-data android:name="com.oculus.intent.category.VR" android:value="vr_only" />
    <meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2" />
    <meta-data android:name="com.oculus.vr.focusaware" android:value="true"/>
  </application>
  <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" />  
</manifest>
woeful sentinel
#

but I think I cannot just put it into the plugins, I have to change the values of Activities icons and other things so it can be merged properly. What I was thinking to do is to take generated one and just change one thing which is Full Screen option

buoyant jolt
#

You should be able to just name it AndroidManifest.xml, and store it under /Plugins/Android. Unity will merge it with any other AndroidManifest files during build time.

#

If you have a pre-modified one, just add the <meta-data android... specific entries

#

You'll need most of these specific settings, including AndroidTV support disabled (which can only be done in the Editor), in order to be able to submit it to Oculus. Some of the settings prevent it from even running in VR mode without them added.

#

The oculus process is very archaic.

woeful sentinel
#

still does not work for some reason.
My merged file looks like this:

#

I've set Full screen + added some flags according to documentation.

#

It is still running in a window lol

#

@buoyant jolt do you have maybe something else in mind that might cause the issue?

buoyant jolt
#

nope if the XR plugin is enabled, Android is enabled, Oculus is enabled in the XR plugin, and the manifest is in place, the build should show in VR mode @woeful sentinel

#

but that manifest seems to be missing com.oculus.vr.focusaware and android.hardware.vr.headtracking

#

Also, your manifest is enabling vulcan, which in some Unity versions is a black screen on the quest

woeful sentinel
#

ok now it works, honesty not sure how it happened.

#

I went through XR plugin management, I saw I have Oculus Disable (I had Oculus Support Enabled however), I enable it then, build failed, disabled and everything went through

#

anyway @buoyant jolt thank you so much for your help! ❤️ I would be struggling more now without your help!

surreal knot
#

when i tried to build an apk to lauch it on side quest this happened

buoyant jolt
#

The screenshot itself just says the build failed because of 2 errors

#

Without looking to find more info there is no way to know what those are

surreal knot
#

cause i just started and i have a deadline tom

#

for my teacher

#

nice dog btw 🙂

buoyant jolt
#

Well, your teacher should be doing a better job and helping you. I know I work hard to make sure any students in my class have usable projects when I'm teaching. So that's on them, not you, in my opinion anyway

But that aside, one message says 2 errors occurred. So we gotta see what those errors say if we are to fix it

surreal knot
#

1: FileNotFoundException: Failed to find $D:/2021.3.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\GradleTemplates\mainTemplate.gradle
UnityEditor.Android.AndroidBuildPostprocessor.GetTemplate (System.String toolsPath, System.String fileName) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.AndroidBuildPostprocessor+<GetDataForBuildProgramFor>d__21.MoveNext () (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Modules.BeeBuildPostprocessor.SetupBeeDriver (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

buoyant jolt
#

I'm betting it's something small, a toggle switch for version or something

surreal knot
#

2: Build completed with a result of 'Failed' in 120 seconds (119509 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

#

3: UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <44a70d1b13cf47e29810e30f45ffae08>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <44a70d1b13cf47e29810e30f45ffae08>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

buoyant jolt
# surreal knot i hope so

Ok Hmm I haven't seen that error before. It's saying your untiy editor is missing a base template.

The FileNotFound is going to stop it from building

surreal knot
#

Yea i saw that weird..

buoyant jolt
#

My best guess, would be to install a newer 2021.3 with the Android systems. Backup the project or make sure it is checked into git or source control. And try and build it with a newer unity install. I suspect the Android runtime installed by your unity is broken.

It's possible browsing to the file will confirm if it is missing

surreal knot
buoyant jolt
balmy locust
#

just a reminder you can use threads to avoid flooding the chat.

buoyant jolt
#

What's wrong with a dozen posts in this chat? #🥽┃virtual-reality is often empty of conversation anyway, and it isn't like anyone needs to read it or gets notified.

surreal knot
buoyant jolt
# surreal knot rn im on 2021.3.6f1 which one should i change to?

I'd roll back just one version
LTS Release 2021.3.5f1
https://unity3d.com/unity/qa/lts-releases

As Unitys last batch of LTS releases had a lot of issues with android on our test machines

From the list I'd pick install via Hub, ensure it is 2021.3.5. and add the Android runtimes

Unity

Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.

surreal knot
#

alright just downloaded it 🙂

#

lets wait and hope for best

surreal knot
#

anddd it worked 🙂

brazen tundra
#

How can I build the game and the screen display shows the right eye instead of the left one?

wet jewel
#

Does anybody knows how to set up Ready Player Me half body avatar with hand animation and all, I don't find any tutorial regarding to this

wet jewel
wintry delta
#

Did anyone here ever write VR handlebar controls? I tried figuring out the pure math, then went to physics joints and neither route has been very fruitful so far 😄 I'm looking to be able to grab either side and have the handlebar rotate to match the hand as much as possible while staying fixed position at the stem

wintry delta
#

Did anyone here ever write VR handlebar

untold condor
#

Hi everyone. I'm trying to use the XR Interaction Toolkit and I've come across a strange UI bug where I have to aim either way above or way off to the side to click buttons. Has this happened to anyone else?

compact lynx
#

does anyone here have a steamvr unity plugin (player prefab, not camera rig) based gun interactable that actually works i could nab? been trying to make one both following tutorials and not and ive had no luck

gray lintel
#

Is anyone here using URP's decal render feature in VR? I'm testing on a quest 2 and simply adding the decal render feature tanks performance by like 40% (with no decals in the scene at all)

#

Technique is set to Screen Space, DBuffer doesn't seem to work (one eye no longer renders correctly)

thick dragon
#

Build Unity 2020.3.37f1
Opened new VR project template.
I'm trying to use the new input system for a VR project.
Added XR - XR Origin(Action-Based) to my scene.
Added the Starter Assets from the XR Interaction Toolkit.
I'm using the default XRI Default Input Actions provided from the sample.
Added the Input Action Manager script and added the XRI Default Input Actions(Input Action Asset) to it.
I also made a prefab of some cubes and added it to the Left and Right Controller Model Prefab so I can see the hands/controllers.
When I press play the hands/controllers move around uncontrollably once the headset looks at the controllers or when I pick them up. What would be the issue? Really new to Unity and VR.

wintry delta
#

@thick dragon It looks like maybe they are colliding with each other each frame. Do both the white cubes and red cubes have colliders, and is there a rigidbody involved? I would try removing all colliders from your cubes. It might not be your tracked hands freaking out, it might just be physics

thick dragon
#

@wintry delta Hi and thank you. There is not rigidbody involved with the camera and controllers. The red cubes or line where already part of the XR Origin when I added it. No rigidbody or collider listed in the inspector for them. I disabled/unchecked the box collider on the white cube. Also unchecked the XR Ray Interactor, Line Renderer and XR Interactor line visual. Played again and it is still the same issue.

wintry delta
#

Ah, right the red ones arent cubes. Theyre linerenderes. Hmm, I'm out of ideas then. Obviously your hands arent spazzing out outside of Unity?

#

Can we see the inspector for your hands, and children of your hands? I'm noticing zero rotation on either of them so perhaps something is off with the XR Controller (action based) settings

#

I'm talking about the objects under XR Origin called LeftHand Controller and RightHand Controller

thick dragon
#

I have a Oculus Rift S, so far I've only went to the home outside of the unity, no spazzing there. Sure one moment while I get a snip

wintry delta
#

I had issues with my Quest 2 hands not tracking at all because I installed both Oculus and OpenXR plugins under XR Plugin Management. Went away when I removed Oculus

thick dragon
#

Okay maybe that is the issue? I believe I installed both Oculus and OpenXR

wintry delta
#

Try removing oculus. I dont see any problems in your screenshots

thick dragon
#

Okay let me try it out

#

Okay I had both Oculus and OpenXR checked in XR Plug-In Manager. I unchecked Oculus but neither headset nor controllers move when only OpenXR is enabled. Checked only Oculus and the same issues persist with the spazzing controllers. Only Oculus, same issue. Only OpenXR enabled, no movement at all, not even camera moves.

wintry delta
#

I have limited experience with the new XR management stuff, so I'm out of ideas. Its a pretty old Unity version. My best suggestion would be to download the latest LTS from hub, and try a new project

thick dragon
#

Okay was a little confused with that, I was originally on 2020.3.33f1 and switched to 2020.3.37f1 thinking it was the latest one.

wintry delta
#

No, the latest is 2021.3.6f1

thick dragon
#

Okay I'll look for it what I have is 2021.3.2f1

wintry delta
#

Oh, wait. You kept saying 2020.x.x.x, now youre saying 2021.x.x.?

#

Make sure youre on 2021. Big difference from 2020

thick dragon
#

Okay and 2022 is not LTS yet correct? Sorry and thank you I will download 2021 and try it.

wintry delta
#

No, 2022 is still beta. Stay away from that one :p

thick dragon
#

Okay will do

#

Sorry for the confusion I have two 2020.x.x.x and 2021 installed. I was using 2020 this entire time lol

wintry delta
#

Try making a fresh project in the 2021 version and set everything up again.

wintry delta
#

@thick dragon Im curious did 2021 act differently?

thick dragon
#

Hey sorry for not updating you on it. I set everything up but I didn’t get any movement with the headset/camera and controllers. It was late and I didn’t have enough time to thoroughly test it. I am working now but I will test it again and make sure the oculus device is working once I get off in 8 hours. Thank you for reaching back

wintry delta
#

No worries 🙂 Hope it pans out

thick dragon
#

@wintry delta Thank you, hope so as well

compact lynx
drowsy bolt
#

If anyone else has had this problem I share my solution. The problem happened when I did the XR Origin update. For some reason a duplicate Tracked Pose Drive component was generated, this did not allow me to move around the environment and also amplified the rotational movements in all the axes of the head. The solution was to remove the duplicate item. I hope it helps others 🙂

buoyant jolt
#

That makes sense, I wasn't sure what a heat was, but now I see - head 😄

random trail
#

With my VR Unity Project if I wanted to make a Desktop Mode be able to launch from the same application what would I need to do to achieve it?

buoyant jolt
#

All we do is load the VR plugin via code

thick dragon
#

@wintry delta Hey sorry for the late reply, Unity is tracking headset movement but the controllers are not moving in 2021. Went to VRChat and testing that controllers and headset should be working fine

random trail
thick dragon
#

No worries 🙂 Hope it pans out

storm ether
#

I have a question, how do I get an interactable from a Socket Interactor, and then delete the interactable

stable scroll
#

every time I try to build my VR game it comes up with this error is there a way to fix it.

severe saffron
#

gonna have to click the above errors so we can see the full printout. You'll wanna know why gradle build failed. Also it only took 17 seconds so I doubt it got far

stable scroll
#

its realy long

#

Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

#

Task :unityLibrary:preBuild UP-TO-DATE

Task :launcher:preBuild UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:generateReleaseResources UP-TO-DATE
Task :launcher:generateReleaseResources UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
Task :launcher:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:packageReleaseResources UP-TO-DATE
Task :launcher:prepareLintJar UP-TO-DATE
Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:processReleaseManifest UP-TO-DATE
Task :launcher:mergeReleaseResources UP-TO-DATE
Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
Task :launcher:processReleaseManifest UP-TO-DATE
Task :launcher:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
Task :launcher:desugarReleaseFileDependencies UP-TO-DATE
Task :launcher:mergeExtDexRelease UP-TO-DATE
Task :unityLibrary:generateReleaseRFile UP-TO-DATE
Task :launcher:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
Task :launcher:processReleaseResources UP-TO-DATE
Task :launcher:generateReleaseAssets UP-TO-DATE
Task :launcher:processReleaseJavaRes NO-SOURCE
Task :launcher:collectReleaseDependencies UP-TO-DATE
Task :launcher:sdkReleaseDependencyData UP-TO-DATE

#

Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
Task :launcher:validateSigningRelease UP-TO-DATE
Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
Task :launcher:compileReleaseJavaWithJavac UP-TO-DATE
Task :launcher:compileReleaseSources UP-TO-DATE
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
Task :unityLibrary:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResRelease NO-SOURCE
Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
Task :unityLibrary:mergeReleaseNativeLibs UP-TO-DATE
Task :unityLibrary:stripReleaseDebugSymbols UP-TO-DATE
Task :unityLibrary:copyReleaseJniLibsProjectOnly UP-TO-DATE
Task :launcher:lintVitalRelease
Task :launcher:dexBuilderRelease UP-TO-DATE
Task :launcher:mergeDexRelease UP-TO-DATE
Task :launcher:mergeReleaseAssets
Task :launcher:mergeReleaseJavaResource UP-TO-DATE
Task :launcher:mergeReleaseNativeLibs FAILED
43 actionable tasks: 4 executed, 39 up-to-date

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

#

sorry its so long

severe saffron
#

got the target api set correctly?

stable scroll
#

wheres that

severe saffron
#

project> player settings

stable scroll
#

what should it be

severe saffron
#

23 or something? Not sure you probably wanna google it. Also I see projects with special characters often fail to build

#

so make sure the path doesnt have weird symbols

stable scroll
#

ok

#

it comes up with this how do i do it

drifting echo
#

which unity version am I better off using if I want to develop unity VR applications right now? 2019.4.x, 2021.3.x, or something else? what considerations or rather pros/cons exist for those?

#

I'm aiming to target PC VR, such as HTC Vive, Valve Index, Oculus on PC. I'm less concerned about mobile/quest(1/2) support

stoic storm
#

Hey
I need to build a VR experience where there are 3 gb of videos, and these video need to be in the streaming asset folder (to acces them offline)
But when my obb is more than 2gb, i can't load my videos, any idea ?

twilit siren
#

does anyone know how to code it so that i can see cam 1 throw my oculus 2 and cam 2 throw my monitor

zenith pasture
#

any idea why I cannot see the scene in oculus (using Oculus XR Plugin)? I can load into rift, but the scene just wont appear when I launch it?

north path
#

@drifting echo
Definitely 2020.3LTS

It has the best compatibility and doesn't reply on legacy VR systems, so should be supported for a while (and easily upgraded in the future)

And it has the best performance for the quest. About 10-20% faster than 2021LTS (and also has spacewarp support with a custom URP).

The best one after that is 2021 lts

#

If you purely develop for PCVR (props to you) 2021LTS also will be fine. It offers faster IL2CPP build times and some more graphical improvements

#

@stoic storm updated unity to the latest version?
Otherwise maybe stream the video from online if possible?

north path
zenith pasture
north path
buoyant jolt
#

Have you tried disabling Vulcan support?

zenith pasture
#

yeah

north path
# zenith pasture yeah

Sharing other player settings and the android tab of xr management with screenshots might help

#

Oh and if you use oculus integration asset, update it

north path
#

@zenith pasture
You can try:

Linear color space

Set mono to il2cpp and enable arm64. This will be a huge performance win

zenith pasture
#

do you think its a performance issue?

#

wouldnt I at least get a low fps output?

stoic storm
twilit siren
gray lintel
fervent trail
#

Hi everyone, I'm having trouble accessing controller position data and the time that the data was last updated (for velocity calculations). I am using an ActionBasedController for this but the XRControllerState's time value is never updated (stays at 0). Anyone have any idea how to solve this problem?

zenith pasture
twilit siren
#

go into projectsettings scroll down to the xr settings and chicken on oculus

#

I can send you picture in 10 mins

zenith pasture
floral ether
#

Hey, does anyone perhaps know how to open the native menu with the xr toolkit?

#

I want to trigger it via gamepad input but have not seen it yet in the API

twilit siren
#

Does anyone know how i can controll a player with vr? i found a free model which also can be used in vr but idk how

wet oriole
#

any vr script where on Collison something gets crafted or made

north path
floral ether
#

Ye that's what I meant.

north path
north path
floral ether
#

I see, thanks 🙂

wet oriole
#

i need help i cant find a steam vr gun or shootable script can someone help me

small shell
#

a question how to do when you want an action to be done when you move an object down or when you shake the controller very fast

north path
abstract sigil
north path
# abstract sigil I'm using Unity 2021 LTS for quest, do you happen to have any resources or links...

You can look for it on the forums under vr. Maybe scroll down a little.

Don't worry tho, if you are hitting your performance goals you can keep using 2021 just fine. I've also done some VR projects in it without issue.

If you want the absolute best performance and don't care about the new features 2020lts might be worth looking into, also because better SpaceWarp support if you're into that. If you use default or shadergraph shaders you should be able yo upgrade to 2021 later on quite easily

dense roost
#

Hi. Should I activate GPU instancing in all materials or disable it please?

severe saffron
#

That depends on how many instances and your platform

#

There are cases where gpuinstancing is slower

dense roost
dense roost
#

Like, I'm currently getting around 50 fps and I need at least 72fps

dense roost
#

Also, how can I know what is bottlenecking please?

#

like, how can I know what is causing the low framerate

buoyant jolt
#

I second staying at 2020, but I know a few studios running 2021 OK

#

Bottleneck : you can look at the Profiler on PC, and Oculus reports tips like render dock for the quest.

zenith pasture
#

where can I find whether the player is using handtracking or controllers?

north path
brazen tundra
#

Hi! How can I build the game and the screen display shows the right eye instead of the left one?

wintry trout
#

So quick event question when working in VR. I'm working on a project with both a 2D and VR client. One of the things I'm working on involves a color picker screen that relies on getting a location from the object being clicked on. With 2D, that's easy, I can get the mouse position and convert it to something local. However with VR? I need to somehow get this location from an interacting raycast and I have no idea how to get the data of the raycast that triggered the event with the XR Interaction Toolkit. Anyone have any suggestions on where I can start?

twilit siren
#

can someone help me how i can animate my handwith a controller i can do it with trigger and grip from a tutorial but i want my thumb when i am on the prymaryTouch so i just have my finger on button but not pressed

#

this is how my trigger and my grip button works

#

and now idk how i can do it for the button a or b

#

i need avater etc but than i dont know how to code it right it doesent worked for me

rich void
#

Do you guys know how to connect Unity to Quest 2 without the Oculus PC app? My laptop doesn't support it unfortunately.

hasty moss
#

I saw somewhere you don't need a Oculus App to this

#

Hello, somebody can tell be what the fuck is happening?

#

I have one script which indicates to which controler script is embeded ( right / left )

#

And then sets keys for this controler

#

And rest of movement

#

This is my code:

#
    // Grabbing
    private Vector3 grabed = Vector3.zero;
    private bool grabbing = false;

    // Buttons
    private OVRInput.Button IndexTrigger = 0;
    private OVRInput.Button HandTrigger = 0;

    // Hands
    private GameObject RealHand;

    private bool grab = false;

    void Start()
    {

        Debug.Log(this.name.ToLower());

        if (this.name.ToLower().Contains("right"))
        {
            IndexTrigger = OVRInput.Button.SecondaryIndexTrigger;
            HandTrigger = OVRInput.Button.SecondaryHandTrigger;

            RealHand = GameObject.Find("RightVirtual");

        }
        else 
        {
            IndexTrigger = OVRInput.Button.PrimaryIndexTrigger;
            HandTrigger = OVRInput.Button.PrimaryHandTrigger;

            RealHand = GameObject.Find("LeftVirtual");
        }
    }

    void Update()
    {
        OVRInput.Update();

        if(RealHand == null)
        {
            Debug.Log("In " + gameObject + " real hand don't exist!!!");
            return;
        }

        if (OVRInput.Get(IndexTrigger) && OVRInput.Get(HandTrigger)) {
            grab = true;
        }
        else
        {
            grab = false;
        }

        if (grabbing)
        {

            Vector3 vec = Distance(transform.parent.parent.position, RealHand.transform.position);

            Debug.Log( "What: " + gameObject + ", Range: " + vec);

            Vector3 position = grabed + vec;

            transform.parent.parent.position = position;

            Debug.Log("What: " + gameObject + ", Where: " + position);
        }

    }

    private void OnCollisionStay(Collision collision)
    {

        if (collision.collider.tag == "Grabable")
        {
            if (grab && !grabbing)
            {
                Debug.Log("Grabed");
                grabed = transform.position;
                grabbing = true;
            }

            if (grab)
            {
                Debug.Log("Grabing");
                transform.position = grabed;

            }
            else
            {
                Debug.Log("Realased");
                transform.position = transform.parent.position;
                grabbing = false;
            }
        } else
        {
            grabbing = false;
        }
    }

    private void OnCollisionExit(Collision collision)
    {
        transform.position = transform.parent.position;
    }

    private Vector3 Distance(Vector3 x, Vector3 y)
    {
        return new Vector3(x.x - y.x, x.y - y.y, x.z - y.z);
    }```
north path
storm ether
#

Does anyone know how to delete an interactable from a Socket Interactor with a button press (Unity XR)

#

if no one can answer that, does anyone know how to make the Socket un-interactable when when an Interactable is in the socket
I'm trying to make a mag drop, I would like to delete the magazine on a button press, and then Instantiate the mag model alone so you can't reuse a magazine

proud umbra
#

So basically I have it so when I click the grip button on my vr controller(making for quest 2) it picks up an item and brings it to my hand.(I believe this is using xr grab interactables) I have another script for when I click on another object it changes a bit. This works alone and grabbing works alone, but when im holding an item it doesnt work. I have it so the line/raycast turns white when I can interact with it which it does normally, but when holding an item it doesnt turn white even though the raycast goes through and touchest that 2nd object. Any help would be greatly appreciated.

proud umbra
neon crane
#

Hey, is playerController on it's own is enough to PREVENT the player from walking through the wall ??
do I need a collider and a script was it maybe ??

i dont have a headset right now to test it but when i drag the player by the player controler and push him toward the wall, I cant see any resistance!

proud umbra
wintry fiber
#

How to reset the camera's z and x rotation when entering a portal in VR?

I just started unity a few weeks ago, and I have no coding experience. I've been grinding to learn 12 hours a day but I can't write/modify my first script.

I got the base of my game off Github, and I managed to integrate VR into it by installing the necessary prerequisites. Now the game has a script called "RigidbodyCharacterController" which contains movement info and camera rotation for when you enter a horizontally placed portal. The issue is that it doesn't work in VR, contains useless movement info, and it's buggy, so i got rid of it. Now I just need a script that can reset the camera's z and x rotation axis each time I enter a portal.

here's the old script:
https://gist.github.com/Lego-Dimensions/2898bf1d27f86e2d3ad770f799629777

here's the BasicPortal gameobject + components:
https://i.stack.imgur.com/ES0mb.png

here's the rest of BasicPortal components:
https://i.stack.imgur.com/oHuD1.png

warped grotto
#

why is there no controller xr stuff

#

???

north path
#

Installer xr management and XR Interaction Toolkit?
@warped grotto

Follow guides or the unity learn path for VR

wintry fiber
neon crane
wintry fiber
#

read above

#

scroll up

#

i need to reset the camera's x and z rotation once every OnEnterPortal call

#

i have a headset and i can help you

neon crane
#

I dont think anyone could help you with that
1 - we have no idea what project u are working on
2 - OnEnterPortal is a custom function , only u know what it does
3 - we dont know what do you mean by " reset "

the list goes on and on ... I think this one is something u have to figure out on ur own

#

i bought a headset, I will test it later 😄

proud umbra
#

I think that would work

#

Lmk if it doesnt though

wintry fiber
#

yeah, i'm dumb so i don't know how to set it up, would you mind sending (not partially) the whole script ? i told you i'm new to coding.

wintry fiber
#

yes

#

just x and z

proud umbra
# wintry fiber just x and z

public GameObject camera;

Vector3 target;
target.x = transform.parent.eulerAngles.x;
target.z = transform.parent.eulerAngles.y;
transform.rotation = Quaternion.Euler(target);

#

maybe that?

#

(don't forget to set the camera as the gameobject in unity itself

wintry fiber
proud umbra
wintry fiber
#

i need to have the camera rotate back to how it was by the time you get out of the vertical portal in the video shown

#

if someone helps, i'll be eternally grateful

brazen tundra
#

Hi! How can I build the game and the screen display shows the right eye instead of the left one?

twilit siren
mellow rain
#

For quest 2 is ovr the best integration to use?

#

Or should I use xr

dense roost
cobalt eagle
dense roost
cobalt eagle
#

About the hand pickup not the hand rotation thing he had no problem with that

#

He would make a vid3o about picking stuff up with dat system

dense roost
#

no idea then. Maybe you have to add some angular drag to the rigidbody or remove some drag, idk

vapid vortex
#

Hi, I'm trying to do a Main Menu, but can't click any buttons. I have a XR Ray Interactor on each Controller, selected 'Hover to select' and have Eventsystem with a 'XR UI Input Module' script. Does somebody have an idea how to make it work? I am really new to VR..

north path
lavish pier
#

hey, I wanna make a game where you swing across monkey bars

#

how would I do that

hasty moss
#

I have familliar problem

#

BTW I will ask again

#

Somebody knows why the right hand didn't works?

#

I can gram things with two hands

#

But move only with one

#
// Grabbing
    private Vector3 grabed = Vector3.zero;
    private bool grabbing = false;

    // Buttons
    private OVRInput.Button IndexTrigger = 0;
    private OVRInput.Button HandTrigger = 0;

    // Hands
    private GameObject RealHand;

    private bool grab = false;

    void Start()
    {

        Debug.Log(this.name.ToLower());

        if (this.name.ToLower().Contains("right"))
        {
            IndexTrigger = OVRInput.Button.SecondaryIndexTrigger;
            HandTrigger = OVRInput.Button.SecondaryHandTrigger;

            RealHand = GameObject.Find("RightVirtual");

        }
        else 
        {
            IndexTrigger = OVRInput.Button.PrimaryIndexTrigger;
            HandTrigger = OVRInput.Button.PrimaryHandTrigger;

            RealHand = GameObject.Find("LeftVirtual");
        }
    }

    void Update()
    {
        OVRInput.Update();

        if(RealHand == null)
        {
            Debug.Log("In " + gameObject + " real hand dosen't exist!!!");
            return;
        }

        if (OVRInput.Get(IndexTrigger) && OVRInput.Get(HandTrigger)) {
            grab = true;
        }
        else
        {
            grab = false;
        }

        if (grabbing)
        {

            Vector3 vec = Distance(transform.parent.parent.position, RealHand.transform.position);

            Vector3 position = grabed + vec;

            transform.parent.parent.position = position;
        }

    }

    private void OnCollisionStay(Collision collision)
    {

        if (collision.collider.tag == "Grabable")
        {
            if (grab && !grabbing)
            {
                Debug.Log("Grabed");
                grabed = transform.position;
                grabbing = true;
            }

            if (grab)
            {
                Debug.Log("Grabing");
                transform.position = grabed;

            }
            else
            {
                Debug.Log("Realased");
                transform.position = transform.parent.position;
                grabbing = false;
            }
        } else
        {
            grabbing = false;
        }
    }

    private Vector3 Distance(Vector3 x, Vector3 y)
    {
        return new Vector3(x.x - y.x, x.y - y.y, x.z - y.z);
    }
#

Right controller works in the other way than left?

hasty moss
#

Anyone?

mild sky
#

Hi. Anyone knows why if I remove from the head the oculus quest 2 in the unity editor the tracking pause (and from the lenses I see a black screen), while from build it doesn't happen (and I see the scene image in the lenses)?

hasty moss
#

IDK, when I test games mine or not mine then always is a black screen and stop tracking when I remove HMD

#

You run your build on PC or Quest 2?

mild sky
hasty moss
#

Maybe

#

But I guess this is just difference between playing on PC and on Quest 2

eternal musk
#

i cant select anything

mortal wedge
#

hi! I've been having a camera issue that I can't quite seem to figure out. For whatever reason, my view is inverted, and everything is appearing incorrectly through the lenses. It's like the field of view is off and moving my head causes the player to look in the wrong direction. I'm thinking it is some sort of problem with a setting, since the rig I have works perfectly fine in other projects, and I was just wondering if anyone might know if I pressed a button I shouldn't have, or something like that

#

if anyone knows what's happening, please ping me. Thanks!

wintry fiber
#

Okay so, I have a VR Scene, and if i use both rigidbody (for physics) and character controller at the same time, gravity will refuse to work and instead goes flying into the sky.. what should i do? if i remove Character Controller the player works normally but then there's no wall collision. should i create a script for wall collision, and remove Character Controller? ping me if you answer!

hasty moss
hasty moss
#

Do you use a Unity VR template?

hasty moss
#

If just need a falling then the option with CC supposed to be easy

wintry fiber
#

i'm lost

hasty moss
#

You want to collide with for e.g wall, yes?

wintry fiber
#

yea

hasty moss
#

So player need to have rb and for e.g box colider

#

And the Wall need only colider

wintry fiber
#

yeah i use Capsule Collider

hasty moss
#

And that's it

wintry fiber
#

weird.. cause i can go right through walls

#

can i screen share with you so i can show you?

#

via discord

hasty moss
#

Can you record it? And give us a link on yt for .eg

wintry fiber
hasty moss
#

You did this map in blender?

#

Or other 3D software?

wintry fiber
#

it's just a hollow made in a voxel software

hasty moss
#

Try to add a unity cube

#

With collider

#

If this will work then this is problem with walls

wintry fiber
#

can you empty the cube on the inside and make it an empty room by scaling it up?

hasty moss
#

AFAIK no

wintry fiber
#

alright

hasty moss
#

Because on empty cubes collisions dont work

wintry fiber
#

i'll let you know

#

when i'm done

#

nope, i recreated the hollow with cubes only with box colliders and still the only thing that collides with the player is the floor

#

@hasty moss

hasty moss
#

Can you send a screen shot in good quality?

#

Inspector of player and to cube

#

and the floor

mortal wedge
#

I think it’s some mistake I made recently, but a deeply rooted one. I say that because it was working fine up until this morning, so whatever I did as a mistake is probably a simple misclick somewhere

hasty moss
mortal wedge
#

I know. The problem doesn’t really lie in the XR rig I’m using though. It actually works fine in other projects. It’s this specific one. Worst come to worst I can easily transfer everything to a new project, but my worry is this happening again in the future when I’ve added more stuff to the game

proud umbra
mortal wedge
hasty moss
#

And object as a child and then off collider

brazen tundra
#

Hi! How can I build the game and the screen display shows the right eye instead of the left one?

hasty moss
#

Try change this in the edytor

#

Editor*

#

Or as far as I remember in camera options it was

#

To choose primary eye

wintry fiber
# hasty moss Try change this in the edytor

sorry for not coming back yesterday,
fortunately, i think i found the solution, my rigidbody had Freeze Position Checked on X and Z axis, i unchecked it , and i had wall collision!!
but that also comes with a few more issues, the collider slides around the player and i can't seem to figure out the cause. by sliding i mean that it doesn't stay on the player it goes in random directions around the player

#

do you have any idea what's happening?

#

or do you need a video

hasty moss
#

I need a screen shot of a tree

#

|| If I won’t respond then this mean I have forced nap ||

wintry fiber
hasty moss
#

I mean hierarchy XDDD

#

You know, there where are all object and their childs

wintry fiber
#

i don't see why you need that but here it is.

hasty moss
#

I need to know which object have your player collider

wintry fiber
#

Camera Offset, i tried placing it on XR Origin, but the gameobject with the Collider needs the "Teleportable" script with it too, when i place the "Teleportable" Script on the XR Origin, Inputs and Controller Tracking will refuse to work

#

the "Teleportable" script tells the game that this gameobject is going to walk through the portals

buoyant jolt
hasty moss
wintry fiber
#

system*

hasty moss
#

RB ( Rigidbody ), CC ( Character Controller ), TP ( Transform.Position )?

wintry fiber
#

i'm staring at your message and i can't seem to understand what you mean

hasty moss
#

You can move your via rigidbody with for. E.g addforce

#

You can use character controller and use move

#

And you can change position of player by setting transform.position

#

You can send code what is in that script

wintry fiber
#

if i use CC i won't have gravity unless i use RB too

#

let me post the script on a website since it's too long

hasty moss
wintry fiber
#

so if i put this script on XROrigin (GameObject)
(with/without CC)
my controllers won't track

hasty moss
#

At all?

wintry fiber
#

yeah, will not move from the 0, 0, 0 position

#

i even tried dragging XR Origin into an Empty Gameobject and putting the script on the empty gameobject instead, same result

hasty moss
#

Fast test do a new script with only CC movement, buttons checking and attach it to Origin. Enable CC and disable RB

#

Then we will be know if Unity see the controller

#

BTW disabled the other movement script

wintry fiber
#

on which, CameraOffset or XR Origin?

hasty moss
#

XR Origin

#

BTW as far as I remember the hands don’t suppose to be childs of camera/camera offset

#

If test with CC won’t work then I take a nap to refresh my mind.

wintry fiber
#

sounds good

#

it's kind of embarassing to remind you about this but... i don't know how to write scripts, i'm still in my first month of unity.. so you can rather write it yourself or take that nap, i'll wait either way 🙂

hasty moss
#

If you want to try by yourself then check this 😉

#

BTW you work on Oculus, right?

wintry fiber
#

yes

#

quest 2

hasty moss
#

Ok, so when I will wake up I will send you my movement script to test

wintry fiber
#

ping me

#

alright! see you

wintry fiber
#

ughhh.. i give up

#

i'll wait..

hasty moss
wintry fiber
#

AHHH

hasty moss
#

For now to chceck if movement works

wintry fiber
#

thanks

hasty moss
#

This is your own "gravity"

wintry fiber
#

where do i place that? into a new script or specifically existing one?

hasty moss
#

New script

wintry fiber
#

👍

hasty moss
#

And disabe existing for a moment

wintry fiber
#

how was your nap?

hasty moss
#

Good 4 hours

wintry fiber
#

void Update or void Start()?

#

let me be more clear, where do i place this

GetComponent<CharacterController>().Move(fall* Time.deltaTime* speed);
hasty moss
wintry fiber
#

good

hasty moss
#

Anywhere in Update

wintry fiber
#

The name 'speed' does not exist in the current context

#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DiscordScript : MonoBehaviour
{
    public float fall = 1.5f;

    void Update()
    {
        GetComponent<CharacterController>().Move(fall * Time.deltaTime * speed);
    }
}

hasty moss
#

Oh, right, I didn't saw this

#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DiscordScript : MonoBehaviour
{
    public float speed = 1.5f;

    void Update()
    {
        GetComponent<CharacterController>().Move(-transform.up * Time.deltaTime * speed);
    }
}```
#

I need to wake up XD

wintry fiber
#

'Transform' does not contain a definition for 'down' and blah blah blah

wintry fiber
hasty moss
#

This supposed to be -transform.up

wintry fiber
#

oh yeah, sorry

#

it's done

#

what do i do now?

#

i still can't test because the controllers still won't track

hasty moss
#

You enabled a CC?

wintry fiber
#

yeah?

hasty moss
#

Then go in editor and drag your player object up

wintry fiber
#

they won't track because of "Teleportable" script

#

if i remove that they will track

hasty moss
#

Wait, we want to bake a movement and to collider not slide, right?

wintry fiber
#

yes! but at the same time i want Teleportable to work too

hasty moss
#

This script had to test if collider works good when object falling without additional script than CC movement

wintry fiber
#

like i said, that enables me to go through portals.. without it i can't do my project

hasty moss
wintry fiber
#

it's super smooth so i think i can be half in portal

#

it clones the player

hasty moss
#

Ok

wintry fiber
#

okay.. gravity works! but the collider still has the wrong offset, look where the player is vs where the collider is

#

@hasty moss

hasty moss
#

Collider is atached to ofset?

wintry fiber
#

yes, like i said if i place it on XR Rig it will also need Teleportation Script to teleport which blocks the controller tracking

hasty moss
#

Colider have center on 0?

wintry fiber
#

Yes! all of the axis on 0

#

and Camera offset Transform looks like this

hasty moss
#

Collider

#

Not tansform

wintry fiber
#

i don't have collider, i have the CC...

#

and it is on 0

hasty moss
#

Oh, right XD

wintry fiber
#

i also have this script which doesn't seem to do it's job

using System.Collections;
using System.Collections.Generic;
using Unity.XR.CoreUtils;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;

public class CharacterControllerDriver2 : MonoBehaviour
{

    private XROrigin xROrigin;
    private CharacterController characterController;
    private CharacterControllerDriver driver;
    void Start()
    {
        xROrigin = GetComponent<XROrigin>();
        characterController = GetComponent<CharacterController>();
        driver = GetComponent<CharacterControllerDriver>();
    }

    // Update is called once per frame
    void Update()
    {
        UpdateCharacterController();
    }

    /// <summary>
    /// Updates the <see cref="CharacterController.height"/> and <see cref="CharacterController.center"/>
    /// based on the camera's position.
    /// </summary>
    protected virtual void UpdateCharacterController()
    {
        if (xROrigin == null || characterController == null)
            return;

        var height = Mathf.Clamp(xROrigin.CameraInOriginSpaceHeight, driver.minHeight, driver.maxHeight);

        Vector3 center = xROrigin.CameraInOriginSpacePos;
        center.y = height / 2f + characterController.skinWidth;

        characterController.height = height;
        characterController.center = center;
    }
}

#

it should carry the CC based on the location in the real world

#

but i guess it's because i don't have the xr rig component in the CameraOffset gameobject

#

either way, is there any way i can replace the xr rig from the script above with something else?

#

like the cam?

#

i'm doing this because i think the CC doesn't move with the real world location, like if i move my head to right, it stays in place

#

hence the collider offset not being where the player is

hasty moss
#

Then this movement is frelative

wintry fiber
#

thanks for taking your time btw, it really means so much to me!

#

without you, the project will be incomplete

#

so what do i change in the script that i sent above?

hasty moss
#

Wait

#

There is a reason why do you use a XR?

#

Instead OVR?

wintry fiber
#

i tried using OVR but the locomotion seemed too complicated so i returned to XR

#

can you guide me?

hasty moss
wintry fiber
#

so i dragged the OVRPlayerController from the Oculus>VR>Prefabs into my scene

#

i disabled XR Origin

#

alright, so how do i do locomotion?

hasty moss
#

Wait

wintry fiber
#

yeah?

hasty moss
#

Im curious

wintry fiber
#

1 sec

#

there are some missing scripts

hasty moss
#

Erase Virtual objects

#

And on this base try to work with controllers

#

Supposed to work every time

wintry fiber
#

wdym "Virtual objects"?

hasty moss
#

And in Right controler and Left Controler add a cube

wintry fiber
#

what about this?

#

do i need this or not?

hasty moss
wintry fiber
#

the old one

#

the current one just has Camera Offset

#

i deleted the missing script

hasty moss
#

Then no. BTW I recommend you workin in new project to don't mess up anything

hasty moss
#

Run it

#

To see if your hands moving

wintry fiber
#

with the teleportable script in it?

hasty moss
#

For now no

wintry fiber
#

just CC?

#

are you sure it's supposed to be just CameraOffset in the XRRig?

#

i feel weird deleting that missing script

#

what if it was the Rig itself

hasty moss
#

AFAIK Camera offset is your head

#

And the Right controler and Left controler are hands

wintry fiber
#

alright

hasty moss
#

Send a SS of hierarchy

wintry fiber
#

i disabled XR Origin

hasty moss
#

Ok, and to see if you are moving hands

#

Add a cubes

#

to right and left controler

#

and run the game

wintry fiber
#

i added the portal gun in the right

hasty moss
#

Okey

#

Test it without telepoertation for now

wintry fiber
#

alright good

#

it tracks

hasty moss
#

Okey, now movement

#

You wanna a walking with analog or only to teleport?

wintry fiber
#

walking with analog

#

i'm not sure teleporting even works with portals

#

like locomotion teleporting,

#

would be a weird mechanic for this case

#

so walking with analog is the way now

hasty moss
#

Vector2 move = OVRInput.Get(OVRInput.Axis2D.SecondaryThumbstick);

GetComponent<CharacterController>().Move( (transform.forward * move.y) * Time.deltaTime * speed );
#

Try this

#

For walking forward and backwards

wintry fiber
#

new script?

hasty moss
#

Yea

#

And attach it to the top of a Player

wintry fiber
#

wait, you mean in the XRRig?

#

'speed' does not exist in the current context

#

@hasty moss

hasty moss
#

Add your own varble with speed

wintry fiber
#

Vector3?

hasty moss
#

Float

wintry fiber
#

good

#

let me run

#

it doesn't do any..thing?

#

1 sec

hasty moss
#

Wait

#

You have CC?

wintry fiber
#

yes

hasty moss
#

You move your analog to the top?

wintry fiber
#

every possible way

#

both of them

#

yes i tried

#

i think it doesn't receive my input

hasty moss
#

To test it

#

Do this

#
if (OVRInput.Get(OVRInput.Button.One))
{
  Debug.Log("I work - A button");
}
#

If this won't work then i reccomend a donwload Oculus packet

#

And set it in options

wintry fiber
#

which options?

#

Project Settings or Preferences

#

i have downloaded the Oculus Plugin

#

i mean i already had it

wintry fiber
#

nope

#

where should it appear as a message?

#

in the console?

hasty moss
#

Yes

wintry fiber
#

it doesn't

#

i pressed the A button and it doesn't appear

#

i tried all of the other buttons too

hasty moss
wintry fiber
#

of course i did that

#

that's the first thing i did when i made my project

hasty moss
#

Wait,I forgot about

#

OVRInput.Update();

#

Use it in update

#

On the first line

#

In scripts where you are using OVR

wintry fiber
#

WORKS!

#

alright, next?

hasty moss
#

Movement too?

wintry fiber
#

the movement works, back and forwards

hasty moss
#

Relativly?

wintry fiber
#

yeah it is acceptable

#

could do a lil' bit faster

#

but works

hasty moss
#

You can fight with speed later

#

Add a:

GetComponent<CharacterController>().Move( (transform.right * move.x) * Time.deltaTime * speed );
```next
wintry fiber
#

works

#

got a problem though, the movement should update the direction i'm walking by the direction i'm looking, (if you know what i mean), but it isn't such a big problem.

#

like forward should be in the direction i'm looking only

#

anyways let's do rotation

#

if you want

hasty moss
#

i know, but this is a (?)hard(?) problem ( in my unity environment ) because this you have to get a camera rotation in Y

wintry fiber
#

let's do rotation shall we?

hasty moss
#

Okey, BTW I will try to write answer to movement

#

BTW don't add a up-down rotation

#

Because this will be sick

wintry fiber
#

i won't

#

new script or adding to this one further?

hasty moss
#

To this

wintry fiber
#

okay

hasty moss
#
transform.Rotate(transform.right * move.x);
#

Try this

wintry fiber
#

i probably did everything wrong but here's what i did

void Update()
    {
        OVRInput.Update();
        Vector2 move = OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick);
        Vector2 rotate = OVRInput.Get(OVRInput.Axis2D.SecondaryThumbstick);

        GetComponent<CharacterController>().Move((transform.forward * move.y) * Time.deltaTime * speed );
        GetComponent<CharacterController>().Move((transform.right * move.x) * Time.deltaTime * speed);
        GetComponent<CharacterController>().(transform.Rotate(transform.right * rotate.y) * Time.deltaTime * rotate);


    }
#

correct me

#

when i told you i'm terrible at this, this is what i meant ⬆️

hasty moss
#
GetComponent<CharacterController>().Move( (transform.forward * move.y) * Time.deltaTime * speed );
        GetComponent<CharacterController>().Move( (transform.right * move.x) * Time.deltaTime * speed );
        transform.Rotate(transform.right * rotate.x);
wintry fiber
#

alright cool

#

thanks

hasty moss
#

😉

wintry fiber
#

and sorry for being stupid

hasty moss
#

XD

#

Just go watch some Brackeys about unity

wintry fiber
#

it just makes me backflip

#

doesn't work

#

backflip/frontflip

hasty moss
#

change right to forward

#

or up

wintry fiber
#

👍

#

works with up

#

and what now?

#

i'ts 3:22 am here so i probably need to go soon unless i get it to work 👀

wintry fiber
#

ugh, let's do this fast then, what happens now?

#

i try teleportation?

hasty moss
#

What do you want to add now?

hasty moss
wintry fiber
#

shoot, i hope this works

hasty moss
#

But you don’t use a VR

sharp bone
#

Hello In need of some teammates for developing a VR project that has won a prize from Oxford University. If you are interested plz contact

hasty moss
#

What skill do you need?
On what level?
Any additional languages?

median cobalt
#

InputOVR hands and controller missing. Any fix?

hasty moss
median cobalt
#

nvm i got it

#

but now i struge

#

i want to scale cube using my hands

#

like this

hasty moss
#

And whats wrong?

hasty moss
slim ledge
#

Hello.
I don't know if i am in the correct place (and if i can ask for this)!!!
We are working on a multiplayer project in "Unity". We are using "OpenXR" and for the multiplayer part we use "Fishnet".
We did not find videos or tutorials that work with this "software", the "Fishnet" community is still small and all the tutorials I have found use "Photon Pun", which is totally different from "Fishnet".
Does anyone have any tutorials/examples that work with "XR" and "Fishnet"?
Thanks a lot.

north path
wintry fiber
#

@hasty moss I MADE IT

#

the game mechanic finally works

hasty moss
#

Nice

wintry fiber
#

do you know if i'm allowed to post the demo on Side Quest?

#

saying it because it's just a free github project converted to VR

#

but i'm also thinking at the thousands of kids waiting for a portal game on the platform

wintry fiber
hasty moss
#

Pobably yes

brazen tundra
#

Hi! How can I build the game and the screen display shows the right eye instead of the left one?

#

In the "Target Eye" it only gives me these 2 options

north path
wintry fiber
#

can you check the "SpawnPortalOnClick" script for me?

brazen tundra
#

I'm using Unity 2021.2.19f1

#

And, I don't think I'm using custom shaders(how do I check if I am?)

north path
#

If you don't know you probably don't. You can check on your materials.
Maybe try the latest 2021 lts, this version is quite old @brazen tundra

proud umbra
#

im not sure tbh

#

if you could help me that would be awesome but idk xr grab interactable works :(

#

I also have another question, in xr grab interactable select is for the trigger and activate is for both, how do I check for JUST the grip?(side button)

proud umbra
#

but like I said before idk how to check for those buttons

hasty moss
#

What is XR grab?

proud umbra
hasty moss
#

Or this is some package?

#

|| I write all my solutions by myself 😅 ||

wintry fiber
#

@hasty moss , could you help me with writing a script for updating the collider's position based on the camera's?

#

because i can peak my head through walls

north path
# wintry fiber because i can peak my head through walls

Either implement something similar to the video below, or simply make the screen fade to black when putting your head in a collider

https://youtu.be/pgX2tLIXNZ8

The XR Interaction Toolkit provides a very easy to set up locomotion system, BUT players can easily cheat by walking through walls. In this video I'll show you how to prevent that from happening!

// 🎓 UPCOMING VR COURSE
https://www.vrcreatorpro.com

// 🦸‍♀️ GET THE SOURCE PROJECT (by supporting me on Patreon!)
https://www.patreon.com/JustinPBar...

▶ Play video
wintry fiber
#

👍

wintry fiber
#

and no, my project doesn't work with CC

#
using System.Collections;
using System.Collections.Generic;
using Unity.XR.CoreUtils;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;

public class CharacterControllerDriver2 : MonoBehaviour
{
    public CharacterController _character;
    public XROrigin _xrOrigin;
    void Start()
    {
        _character = GetComponent<CharacterController>();
        _xrOrigin = GetComponent<XROrigin>();
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        _character.height = _xrOrigin.CameraInOriginSpaceHeight + 0.15f;

        var centerPoint = transform.InverseTransformPoint(_xrOrigin.Camera.transform.position);
        _character.center = new Vector3(
            centerPoint.x,
            _character.height / 2 + _character.skinWidth,
            centerPoint.z);

        _character.Move(new Vector3(0.001f, -0.001f, 0.001f));
        _character.Move(new Vector3(-0.001f, -0.001f, -0.001f));
    }
}

this is the code

#

i need to switch the Character Controller to Capsule Collider smhow

north path
#

Personally haven't finished it.
You are probably using a rigidbody for movement. Use that instead of CC

wintry fiber
#

i'm still in my first month of unity so it's pretty rough for me to write scripts

north path
#

Then simply fade the screen when in a collider. Definitely easier

#

Otherwise google how to move a rigidbody in this way

wintry fiber
#

Okay... i see

wintry fiber
#

i can't find anything on google

#

i searched every single possible term

#

i just need the Capsule Collider to follow my camera, why does it have to be so complicated?

north path
#

There is no rigidbody on the player somewhere?
If so, how do you move the player?

There also needs to be a rigidbody to have collision in the first place

wintry fiber
#

yes there is

#

there is rigidbody obviously

#

@north path

#

but idk how to write the script

north path
#

Online there are many guides for rigidbodies. If it's too hard get back to it later.
Don't have time to write scripts for everyone (sadly)

cyan sky
#

OpenXR action based controllers stop working when Oculus Integration is used:(
The only solution is to disable Oculus Integration..but then we can't access Oculus platform functions

north path
cyan sky
north path
#

You just need a store compatible androidmanifest file (for app lab at least, but probably also for the store)
Generate it in a separate project and then copy it over :p

#

@cyan sky

cyan sky
#

Hmm..that's interesting..but still unable to access platform features, such as friends, achievements, etc.

north path
#

Maybe make a forum post explaining the issue in more detail. Bit more organized than this

proud umbra
#

It also moved the hands and stuff but thats a dif xr script

#

I think ik how to if you can help me with the button stuff

hasty moss
#

I can help you with OpenVR

#

I don’t know the XR yet

proud umbra
cyan sky
#

It's a known issue:/ ..I was just hoping there was some sort of a workaround

#

The latest version of OpenXR works, but the controllers loose tracking if you enable the latest Oculus Integration

proud umbra
#

Wait you can test vr stuff in unity itself?

cyan sky
#

The input still works, but the controllers are stuck to the floor

hasty moss
brazen tundra
#

@north path Hi! Hope you are well! I updated to the Unity Version 2021.3.6f1, however I still don't have an option to select the eye. Does your give you an option?

proud umbra
proud umbra
#

Do you think you can help me switch later

hasty moss
#

Yea

proud umbra
wintry fiber
#

@hasty moss hey man you're still busy right?

#

i couldn't figure it out 😦

hasty moss
wintry fiber
#

can you ping me when you're home?

hasty moss
#

IDK if I don’t go straight to sleep

hasty moss
wintry fiber
#

sure

hasty moss
#

Maybe I think something up

wintry fiber
#

i just need the rigidbody/capsule collider to follow the camera/real world position so i can't get my head into walls

hasty moss
#

You can add a second collider to your camera

#

Or do a script that if distance between face and wall is for e.g 1 then you have black screen. ( You can later change it into fading)

wintry fiber
#

no, that will break my portals, i don't want black screen when entering portals

proud umbra
wintry fiber
#

i don't have that kind of portals, i can place portals anywhere, they're not static

proud umbra
wintry fiber
#

yeah you're right, i just think that the rigidbody/capsule collider following the camera is way more convienent

hasty moss
#

Can you explain why do you want to do that that way?

wintry fiber
#

because this game is room-scale

#

simple

hasty moss
#

I mean why rigidbody. As far as I understood you want to make screen black when HMD is too far from body

wintry fiber
#

i don't want to reset view every single time because i end up in walls

#

i want rigidbody/capsuleCollider to follow the camera

hasty moss
#

I have an idea, but wait - I will test it first

proud umbra
#

@hasty moss would you be able to help me transfer to that other one you use now?

hasty moss
#

Remember me what you want to achieve

proud umbra
# hasty moss Remember me what you want to achieve

my raycast doesnt go through an object I want and the only thing I thought of was a custom script but I didn't know how to register the grip/side button so I was going to transfer to the hand controller you use so I could get some assistance from you

hasty moss
#

I will send you for a moment a prefab

#

There you have a name of buttons:

#

BTW You do it for/on Quest?

proud umbra
#

quest 2

proud umbra
proud umbra
#

because wont I also need packaxes and to get rid of my old one and transfer stuff to the new one

hasty moss
proud umbra
hasty moss
#

Look below

#

Touch Controller

proud umbra
#

I started this during a vr game camp and this is waht they told me to do but id be fine with completely switching

proud umbra
#

Oh nvm lol

#

just sideways xD

#

mb

hasty moss
#

VR template have a very nice “player” model

#

Because you have already movement for Headset and controllers - and then you only connect OpenVr as a Oculus inputs

proud umbra
#

ohh gotcha

#

should I just restart then and then just import all my prefabs in then?

hasty moss
#

I guess

proud umbra
#

gotcha ok

#

ill try that then! Tysm! Ill lyk if I have any issues <3

hasty moss
#

And you need to compare your players

#

Form two projects

proud umbra
#

Would it be ok if I dmed you? or want me to just stay here

proud umbra
hasty moss
proud umbra
#

Lmao ok

hasty moss
proud umbra
#

oh I dont have a player rn

#

just hands lol

hasty moss
#

Oh, okey

proud umbra
#

and pretty sure its just the default hand model lmao

#

tyty ill lyk how it goes :)

hasty moss
wintry fiber
#

idk how

hasty moss
#

Script for the highest element: and there in update transform.position = new (child.x, transform.position.y, child.z)

tight geode
#

i have this odd problem where my Draw Calls, Polys and everything is Optimized
but my game still lags a crap ton when its built to Quest 2

#

and i cannot figure out why

north path
#

What unity version?
Multiview?
Define optimized, what are the stats?
What does the profiler say?
Any info about the actual performance?
@tight geode

tight geode
#

Im convinced my Project is glitched or something because i cant figure this out

hasty moss
#

Wait

#

You run your games on PC or Quest?

tight geode
#

Quest 2

#

Thats what im trying to Port it to

hasty moss
#

Try disable a 120hz

#

And other features

tight geode
#

Where do i do that?

hasty moss
#

Left part of the bar

#

There you have a “overlay”(?)

#

And right up corner you have settings

#

And there you can browse

#

And see quality

north path
hasty moss
#

( IDK if this is only to set by oculus app )

tight geode
#

@north path just realized i am using Multiview yes

proud umbra
#

@hasty moss how do I add openvr? The virtual reality supported thing at the bottom isnt here lol

hasty moss
#

This will add OpenVR to your project

mellow rain
#

Im using openxr and when I use hand models (from oculus if it matters) they are at the top of the controller and not like the controller is this normal? if so how can I fix it I tried offsetting it it was really weird

mellow rain
#

nvm legit just fixed it self

hasty moss
#

BTW I have “do not interrupt” status

#

so If you want something then ping

wintry fiber
#

i still haven't figure it out, i'm about to give up on it @hasty moss

hasty moss
wintry fiber
#

yeah

#

i have to play the game without moving in real life

hasty moss
#

I have idea how to do it

wintry fiber
#

thanks man.. you're my last hope

hasty moss
wintry fiber
hasty moss
#

|| OW XD PyCharm is an Python IDE. I ask because a do a FBT with 1/2 web cameras in Python and transfer it to Unity ||

wintry fiber
#

i'm not the person you can talk to about this lmao

#

i just began unity and you're asking me about python

#

XD

hasty moss
#

@wintry fiber I test it and... you have to do nothing to have a room-scale game

#

But if your headset don't move with you

#

you can force it

#

in XRRig -> Debug -> CameraOffset -> Tracking Space

#

IDK if someone from here can do it

wintry fiber
#

noo, that's not what i meant..
what i meant was, i need my collider to move with my headset

wintry fiber
#

i don't have CC i have rigidbody

#

this is the code i found relevant:

using System.Collections;
using System.Collections.Generic;
using Unity.XR.CoreUtils;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;

public class CharacterControllerDriver2 : MonoBehaviour
{
    public CharacterController _character;
    public XROrigin _xrOrigin;
    void Start()
    {
        _character = GetComponent<CharacterController>();
        _xrOrigin = GetComponent<XROrigin>();
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        _character.height = _xrOrigin.CameraInOriginSpaceHeight + 0.15f;

        var centerPoint = transform.InverseTransformPoint(_xrOrigin.Camera.transform.position);
        _character.center = new Vector3(
            centerPoint.x,
            _character.height / 2 + _character.skinWidth,
            centerPoint.z);

        _character.Move(new Vector3(0.001f, -0.001f, 0.001f));
        _character.Move(new Vector3(-0.001f, -0.001f, -0.001f));
    }
}
#

but i don't know how to convert it to Rigidbody and Capsule Collider

#

@hasty moss

hasty moss
wintry fiber
#

i need to carry the existing one with me

hasty moss
#

This is one room at once level, right?

wintry fiber
#

?

#

what do you mean by that

hasty moss
#

You have only one room in one level?

wintry fiber
#

i guess?

#

yeah i think so

#

it's just a room

hasty moss
#

So I think you can exit your body

#

I mean the XRRig will stand in place

#

And you will move with headset with colider

wintry fiber
#

yeah

mild sky
#

Hello to all. Does anyone know if it is possible to get the value of the proximity sensor placed in the middle of the lenses of the oculus quest 2? need it to immediately understand when the user has removed the viewer. Thank you.

mellow rain
#

in openxr is it possible to call the object inside of a socket interactor?

hasty moss
#

But maybe this will help you

mellow rain
#

I tried it didnt really help

hasty moss
#

Can you explain this

mild sky
hasty moss
#

No, I didn't use that

hasty moss
mellow rain
mild sky
hasty moss
hasty moss
#

So if it's multiplayer game, then you can for e.g kick player when he don't respond

#

Wait

#

Look at this

mellow rain
mild sky
mild sky
# hasty moss Look at this link

Already seen. Unfortunately I don't use OVRManager. In addition, all the events like this one I have tried seem to be generated when the oculus goes into sleep mode and not when the user takes off his HMD.

mellow rain
hasty moss
#

And when player want to get it then he needs to grab it and collider suppose to release it

wintry fiber
wintry fiber
#

i don't have a CC

hasty moss
#

Oh, right

wintry fiber
#

and i don't know how to switch it to rigidbody

#

i searched all internet

#

trust me

wintry fiber
#

Thanks!

hasty moss
#

You have idea how to do this?

wintry fiber
#

i think

#

don't quote me on that btw

hasty moss
#

|| In case which you don't know: calculate diffrence between a start pos of camera and that position where is your camera now add this difference to your position ( XRRig ) amd movePosition to this position. When you are on this position yet ( check this ) then set camera again on realative 0, 0, 0 ||

#

|| For better experience to this for a longer range to allow player to pick from behind the wall for e.g ||

wintry fiber
#
using System.Collections;
using System.Collections.Generic;
using Unity.XR.CoreUtils;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;

public class Example : MonoBehaviour
{

    public XROrigin xROrigin;
    public CapsuleCollider capsuleCollider;
    public Rigidbody rigidBody;
    void Start()
    {
        xROrigin = GetComponent<XROrigin>();
        capsuleCollider = GetComponent<CapsuleCollider>();
        rigidBody = GetComponent<Rigidbody>();
    }

    void Update()
    {
        
        Vector3 center = xROrigin.CameraInOriginSpacePos;
        capsuleCollider.center = center;
    }
}

``` this is what i wrote, if you think it's wrong, please correct me @hasty moss
hasty moss
#
using System.Collections;
using System.Collections.Generic;
using Unity.XR.CoreUtils;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;

public class Example : MonoBehaviour
{

    public GameObject xROrigin;
    public Rigidbody rigidBody;

    public Vector3 MyNewPosition = Vector3.zero;

    [Range(1, 20)]
    public float speed = 2.0f;

    void Start()
    {
        xROrigin = GameObject.Find("XRRig");
        rigidBody = GetComponent<Rigidbody>();
    }

    void Update()
    {
        
        rigidBody.MovePosition(MyNewPosition * speed * Time.deltaTime);

        if(xROrigin.transorm.position == MyNewPosition) {
            transorm.position = Vector3.zero;
        }

        if(Vector3.Distance(new Vector(0, 0, 0),  xROrigin.transorm.position) < 1) return;

        MyNewPosition = xROrigin.transorm.position + transorm.position;

        
    }
}```
#

BTW script was wroten fast and on knee

wintry fiber
#

Thank you!

#

you wrote transorm so i fixed it to transform

#

i can't move

#

i think it's because it moves to 0, 0, 0 instead of the camera's position

#

aka xr rig

#

atleast that's what it seems like

hasty moss
#

Wait

#

The cs rigidBody.MovePosition(MyNewPosition * speed * Time.deltaTime);

#

Blocks your code

#

Do it as else to the first statment

wintry fiber
#

How?

#

sry ://

hasty moss
#
rigidBody.MovePosition(MyNewPosition * speed * Time.deltaTime);

        if(xROrigin.transorm.position == MyNewPosition) {
    transorm.position = Vector3.zero;
}
else
{
  rigidBody.MovePosition(MyNewPosition * speed * Time.deltaTime);
}
wintry fiber
#

hey man, i think the way with the screen fade is better

#

you convinced me

#

so i want a point in place that appears when the game starts
if i move (in real life) past that point, the screen turns black and tells me where to go in order to match the point in place with the real world location, something like job simulator

#

@hasty moss

hasty moss
#

Camera is a child of XRRig

#

So the 0, 0, 0 will be always in the center

#

You want to calculate the distance

#

Between 0, 0, 0 and your HMD

wintry fiber
#

1 more thing, i'm making a shooting range where you have to shoot balls in targets, can you make me a script for a gameobject with a trigger to spawn after 2 seconds and dissapear after you shoot it? if it's possible maybe even make it the second time to spawn in another place like 1-2 on the z axis @hasty moss

#

let me know if you need more info

hasty moss
#

In monday wil be the fastes

#

Today I'm tired

#

and tommorow I need to relax

#

Try to do it yourself

#

This sin't hard

#

You have plenty of videos on YT

#

And Free unity templae AFAIR

wintry fiber
#

how should i search on the unity asset store?

hasty moss
wintry fiber
#

i know, but what to search

#

i couldn't find anything

hasty moss
#

Wait, there you have a tutorial

#

Do it

proud umbra
#

@hasty moss aside from openvr do I need any other packages or anything or can I just put all my script and models into that now?

hasty moss
#

Just put

tame bane
#

hey i need help if anyones free

#

just ping me

hasty moss
tame bane
hasty moss
#

Without code I can say everything

foggy prism
#

How do i change the position from controllers with "XRI LeftHand/Position"?

#

also the rotation with "XRI LeftHand/Rotation"

north path
#

What do you mean exactly? @foggy prism

foggy prism
#

I want to move my controllers with these values from XR Interaction Toolkit, its because it doesnt move or rotate, but it gets input

ripe flower
#

how do you get the current eye that is rendering in a script subscribed to RenderPipeline.beginCameraRendering, I've tried camera.stereoActiveEye but that always returns Mono

tame bane
#

@hasty moss

ripe flower
#

Set the Left Controllers transform local position to the left controllers position input action

foggy prism
#

it is there

ripe flower
#

I use my own custom rig, so I don't know much about the xr interaction toolkit

hasty moss
hasty moss
#

Parents of that prefabs

hasty moss
ripe flower
#

yes

#

always returned "both"

hasty moss
#

You can set the eye on the start with this

#

And then you will be know on which eye is displayed

ripe flower
#

then how do I get the eye seperation from the device

foggy prism
#

if you mean from the actions then

#

the same with right hand, just replaced with right actions

#

@hasty moss