How to make Unity OVR hand collide with objects? - unity3d

I want to make the OVRCameraRig hands from the Oculus Integration SDK sample to collide with objects. I mean I want it to use realistic physics and have the hand stopped by a cube or any gameobject without going throught it to make it much more realistic.
I tried to use the "Hand Physics Capsules" built in script for the right and left hand, that puts colliders and rigidbodys on the hand but it does not works as I want it. This method just pushes away the cube but does not stops the vr hands from going throught the cube and I don't want the cube to do any movement.
Thank you all for the help in advance.
Unity version: 2021.3.15f1
Oculus Integration SDK: 46.0

Related

Unity Tilemap 2D player getting stuck in a platform

the question is quite simple. I have this platform and I do not want the player to collide with it when it jumps on the side or under it. In my Tilemap I have already added a composite collider 2D to the collider, so it doesn't separate each tile into a different collider.
As you can see, there are 2 tilesets but 1 collider thanks to the composite collider 2D. I have also changed the physics of this tileset, which is why the collider is so small (which is intended) so that the player can walk under it with no issues: Ej
However, when I jump to try to reach it by side, it does collide, ignoring the side arc function. I have never used a side arc, so I'm not sure if it should be done like this.
This is what happens instead of going through the platform it collides with it ... I thought Side Arc would let me go through the platform if I go by the sides, which is what the logic of the statement of a side arc would do but I guess I was wrong.
it gets stuck instead of going through, so what am I missing or doing wrong ?
I know I could simply hardcode it by making it trigger and when the "ground" collider attached to my pj touch it remove the trigger but I wanted to know if it was possible without that.

Implement Oculus go on unity

just begin to code/work on unity.
No big trouble to set some camera move or launch animation on standalone plateform.
But when I try Oculus go ... I want to get the same "on click' I've got on standalone plateform. Ideally I would make a gaze pointer timed, which avoid joystick.
First : Do you know how to display what you see on the Oculus on unity (https://www.youtube.com/watch?v=TektJroMwxY at 9:40 for example) ?
And then How could I simply implement a gaze pointer click ? I try the Oculus unity integration (https://developer.oculus.com/downloads/package/unity-integration/) UI scene but there is too many code to understand quickly everything.
Many thanks for your help,
Axel
First of all:
Interesting stuff is not quickly to learn
Anyway, you need to know that Oculus gaze point do not work as the typical mouse-click. You need to raycast from your camera to stuff (with attached colliders or build some system) to know if you are clicking on it.
Watch deeply on VrInteractiveItem class, as it's how oculus mainly works.

using unity physics with SteamVR

I want to make a plank game in VR with Unity. So when the player walk outside of the plank, he falls. Right now the only way to make it work is by using VRTK which is another physics system and it makes a lot of things complicated.
I've put a rigidbody on the CameraRig and uncheck "is kinematic". The player falls, but the colliders on other objects are not working anymore...
Is there a way to use Unity's physics with SteamVR and without VRTK ??
Thank you !
Firstly I would read up on Rigidbodies and Colliders/Trigger Colliders - here's a link.
Here's a useful table from that website:
You will need to use this to understand why the player is falling. Is the CameraRig actually colliding with the ground? Is it a Trigger Collider (which has a callback method but doesn't do any physical collision). There's many possibilities for why.
I wrote a script that you can drag in two objects and see if they collide. You could use that if it helps.
The issue in VR with Vive is that determining where someone walks can be difficult, as we are only tracking their head and their hands. If you have a Vive Tracker available and it fits your use case you could use that to track someones foot.
What I have done in the past is use the Camera(eyes) GameObject within the CameraRig and get it's transform.position.x and transform.position.z value to determine if it has gone outside of the boundaries of the object the user is standing on.
Hope this helps,
Liam

Handling GearVR Touchpad input?

When I add an OVRPlayerController into a Unity3d scene and build and run the scene for the GearVR the built-in touchpad spins the camera around the vertical axis, which is redundant with head tracking. What do I need to change so that the touchpad instead allows the camera to move forward and backward, as if walking? Is there a thorough tutorial?
The Oculus SDK 0.4.3 comes with the support for the GearVR Samsung GamePad.
All you need to do:
import the SDK.
overwrite the projectsettings folder of your project with the one that comes with the SDK.
add the overplayercontroller to your scene.
add a gameobject below the overplayercontroller e.g. plane, quad... this will act like the ground (keep the player from falling)
add a collider to the gameobject e.g. mesh collider
then once you run it you will see that you can move around using the gamepad as well as turning the came around the vertical axis...
basically use any first person shooter tutorial for Unity3D and because the Oculus SDK comes with support for the gamepad you can quickly do this...
this link might help
https://www.youtube.com/watch?v=mbm9lPB5GPw

Stopping sprites from toppling off platform

I am new to Unity and am trying to create a simple 2d platformer. I have applied a box collider to my player sprite and the floor/platform its standing on. Now when I go over the platform, it toppes off of it as expected, but I want it to simple fall off it instead of toppling. How can I do this?
Also I saw a video of Unity Live Training in which he was using a separate circular collider for the player's feet.When I did this ,the sprite started rolling. Can anybody help me with this?
There is an "fixed angle" option on Rigidbody2D component, try enabling that