Group Group Group Group Group Group Group Group Group

HTC Vive Tutorial for Unity | raywenderlich.com

#14

Hi @blackdragonbe

All complete. I noticed two minor things that were not clear or not mentioned and I though I’d let you know. The CanTeleport layer needed to be created (as you mention) but it also needs to be applied to the floor and table without this not only could i not teleport but i could not create/ see my lasers (any everyone loves lasers!). Next you save a little time by applying the same inputs to the Right and Left controllers and then change the hand type of one of the controllers, you also need to change the controller pose which for me applied the same hand to both controller with interesting results (I could control the action and direction of the laser with the opposing hand.
All the best I’m off to build myself some virtual furniture. Thanks for creating this tutorial!

1 Like

#15

Thank you for updating this tutorial for SteamVR 2.0! I really appreciate it :slight_smile:

1 Like

#16

@blackdragonbe Do you have any feedback about this? Thank you - much appreciated! :]

0 Likes

#17

Thanks for pointing that out Ben!
I’ll take another look at the tutorial to see if I can fix those issues.

Cheers!
Eric

0 Likes

#18

Hello,
Great tutorial! I have a question though. When I try to bind the controlls the localhost page won’t load. Keeps saying that localhost cannot be reached. Any ideas on how to fix this issue?

Thanks!

0 Likes

#19

@blackdragonbe Can you please help with this when you get a chance? Thank you - much appreciated! :]

0 Likes

#20

i’m at Binding Action and i have this issue, i must have missed something, or maybe an update broke the tutorial flow…

Edit: it might be because of a missing Actions.json, ill update my message if adding it manually fixes the issue (once i find where it needs to go)

Edit 2: nvm the json files are at the right place with the right action in them…

Edit 3: i had to change the skeleton from skeleton to pose for it to work, is it normal or it will break something on the long run?

0 Likes

#21

Hi!

Is the newest version of SteamVR running in the background while you’re trying to load the localhost page?

Cheers!

0 Likes

#22

Using Pose should be fine, it tracks a position and rotation in 3D so that’s exactly what you need. I’ll check my instructions to see if I missed anything.

Cheers!

0 Likes

#23

Updated steamvr is running in the background, everything says they are connected.

0 Likes

#24

My controllers for some reason are not displaying within the scene or game when I run. I skipped ahead a bit and set up controls to see if they display in the console, which they do. Any possible help?

0 Likes

#25

What web browser are you using? It seems there are some issues with firefox.
Try opening http://127.0.0.1:8998/dashboard/controllerbinding.html in Chrome for example.

0 Likes

#26

Can you see the controllers if you open the final project?

0 Likes

#27

I see something similar to what Sugma described. The Camera_Rig works fine and as far as I can tell, but the model of the left and right controllers are not being shown (and their transforms don’t change when I move the controllers – though the Guardian curtain shows up when I go out of bounds so the system sees them).

I opened the final project and the controllers DO show up there. Just trying to figure out what is the difference between the two projects.

The SteamVR_RenderModel components seem to have the same settings.

The only difference I can see outright is that SteamVR_Behaviour_Pose on each Controller won’t take a Pose Action unless I switch the SkeletonLeftHand or SkeletonRightHand Action to Type: Pose instead of Skeleton. (Similar to comment from bellegueule’s comment above).

0 Likes

#28

If I create a new project in either 2018.2 or 2018.3, import the Steam VR plugin and setup the Projects Settings > XR Settings manually, everything seems to be okay; controllers show up as expected. I just moved the assets from the Starter project and now all is well.

Just something odd about opening that Starter project for whatever reason…

0 Likes

#29

The problem does seem to be related to the Pose action that we delete from the default Action Sets. The instant I delete that, the Controllers disappear.

In the final project (see snapshot), I see that the Controller(left) and Controller(right) are using the \actions\default\in\SkeletonLeftHand and \actions\default\in\SkeletonRightHand.

The UI does not allow us to select those, however, similar to what Bellegueule commented above. Not sure how to set the correct settings to replicate what is in the final project. The SkeletonLeftHand and SkeletonRightHand don’t show up as options unless we change them to type Pose.

But then the Controllers don’t generate property after changing the value of the Pose Action.

Update: went through the whole page with Unity 2018.3.6f and an Oculus Rift (instead of the Vive). I had to leave the Pose Action instead of SkeletonLeftHand/SkeletonRightHand, and then use that for the Pose Action for both controllers. But everything else worked great. I did add a throw multiplier to increase the velocity when we release a grabbed object (not sure if that’s the Touch Controllers) but everything was a lot of fun to put together.

Thanks for the terrific introduction to these tools. Now going to poke around the example InteractionSystem that Valve provides.

1 Like

#30

The final project doesn’t seem to launch steamvr. I tried reimporting assets, unfortunately that didn’t work. Unsure if this is a problem caused by me or a change made to unity after an update.

0 Likes

#31

Hi, we are having an issue with our laser pointer. The laser is casting in the wrong direction. We have tried adjusting the rotation and position but are unable to get the laser to cast from the front of the controller outwards. Any help would be appreciated.

Edit: Problem has been fixed by using -transform.forward.

0 Likes

#32

I had a problem where the controllers wouldn’t show in the “Scene” view, only the “Box Collider”.

Fix on my problem
After another try on making this from scratch, I delete nothing from the SteamVR Input. I only rename the “Grab” just as in the lecture. Everything else I let be as it is and saves the changes and my controllers work and are seen as they should. Don’t know if deleting the “InteractUI” from input was the problem, but everything works as intended after that. Im using SteamVR 2.2 and unity 2018.3.6f1

0 Likes

#33

Hi, We are unable to grab objects. We have tried changing the pose action from skeleton to pose action. We have the trigger and Is Kinematic checkbox checked. We have checked the scripts and bindings. We have haptic feedback when pressing the trigger and SteamVR Input Live view shows grab as True. We are unable to run the final version. Is it possible it was created in an older version of Unity?

0 Likes