Jump to content

VIVE_chengnay

Employee
  • Posts

    752
  • Joined

  • Last visited

Posts posted by VIVE_chengnay

  1. For developing PCVR, you will need to use VIVE OpenXR Plugin.

    Currently, VBS only supports OpenXR XR_EXT_hand_tracking.

    For pinch and fist gestures will be mapping to controller's trigger and grip button.

    For other gestures, you can follow the methods in below script,

    https://github.com/ViveSoftware/VRS-Studio/blob/main/VRS_Studio/Assets/Scripts/ScissorsPaperRock/ScissorsPaperRock.cs

  2. Hi @jwatson,

    You can use below code to get the language and country to differentiate between Spanish (Latin America) and Spanish (Spain).

    string GetSystemLanguage()
    {
    	AndroidJavaClass lc = new AndroidJavaClass("java/util/Locale");
    	AndroidJavaObject dl = lc.CallStatic<AndroidJavaObject>("getDefault");
    	string language = dl.Call<string>("getLanguage");
    	string country = dl.Call<string>("getCountry");
    
    	return language + "-" + country;
    }

    For Spanish (Latin America), you will get es-419.

  3. Hi @Renan Viewport,

    Not sure if below solution OK for you,

    It required to install Unity Input System plugin.

    bool IsUserPresence()
    {
    	if (ProximitySensor.current != null)
    	{
    		if (!ProximitySensor.current.IsActuated())
    			InputSystem.EnableDevice(ProximitySensor.current);
    
    		return ProximitySensor.current.distance.ReadValue() < 1;
    	}
    
    	return false;
    }

     

    On 8/23/2023 at 4:25 PM, JulienActiveMe said:

    3 minutes is a lot, is there a way I can put the HMD to sleep from script?

    Hi @JulienActiveMe,

    I forgot to reply your question.

    Sorry about that and please try the solution.

  4. Hi @crdm21,

    Yes, you are right. You can setup your own target.

    SceneMeshAnchor
    image.png.8c7b9a1d33d38d221d4ba2fba9a46f29.png

    PlaneSpatialAnchor

    image.png.99ec79faff9c937253865fa1cd7b6268.png

    21 hours ago, crdm21 said:

    so if the solution is to add the collider manually, that means the scene mesh that we have generate before doesn't have its collider built-in with it when we scan our room?

    To allow developer to get scan mesh result to do whatever they want.

    That's why we did not add collider initially.

    Sorry for the inconvenience.

    • Like 1
  5. Hi @crdm21,

    There is newer version of Wave SDK available.

    Feel free to update to the latest one.

    And, below is the quick patch for adding MeshCollider for your need.

    I modified the GeneratedSceneMeshContainer.cs file.

    private GameObject GenerateNewGameObject(SceneMesh sceneMesh)
    {
    	//Log.d(LOG_TAG, "Add new scene mesh");
    	GameObject newSceneMeshGO = ScenePerceptionObjectTools.GenerateSceneMesh(scenePerceptionManager, sceneMesh, generatedMeshMaterialWireframe, false, context.GetTrackingOrigin());
    
    	if (newSceneMeshGO == null)
    		return null;
    
    	//Process Mesh For Wireframe rendering
    	MeshFilter generatedSceneMeshFilter = newSceneMeshGO.GetComponent<MeshFilter>();
    	if (generatedSceneMeshFilter && generatedSceneMeshFilter.mesh)
    	{
    		Mesh generatedSceneMeshInstance = generatedSceneMeshFilter.mesh;
    		generatedSceneMeshFilter.mesh = ProcessSceneMeshForWireframe(generatedSceneMeshInstance);
    
            // Add below two lines
    		var meshCollider = newSceneMeshGO.AddComponent<MeshCollider>();
    		meshCollider.sharedMesh = generatedSceneMeshInstance;
    	}
    
    	return newSceneMeshGO;
    }

    Let me know if you have questions, thanks!

    NOTE: I test and verify with Wave SDK 5.6.0-r.10.1.

    • Like 1
×
×
  • Create New...