Playmaker Forum
PlayMaker Help & Tips => VR Help => Topic started by: stigma on September 01, 2020, 10:20:13 AM
-
Hello,
I'm new to Oculus Rift S on Unity 5.6.2
I am able to move my character forward with the left controller but I am unable to rotate with the right controller. I have tried a lot of commands but nothing helps.
How do I proceed ?
Thank you
(http://www.maximages.fr/forums/3D/playmaker/controllerRight.jpg)
-
Hey there Stigma.
I made a short explanation in another thread a while ago on how to get basic thumbstick / touchpad rotation working in VR.
https://hutonggames.com/playmakerforum/index.php?topic=21955.msg96286#msg96286 (https://hutonggames.com/playmakerforum/index.php?topic=21955.msg96286#msg96286)
-
I can't find "Rotate Around"
Do you have an FSM example?
-
Just import this package into your project and drag the prefab into your current scene and follow the instructions in the FSM.
This is setup for SteamVR with a custom action that you can just swap out for the one you're using. It's basic but it should work.
Let me know if you have any problems.
-
I copied the FSM states to my right controller
(http://www.maximages.fr/forums/3D/playmaker/rotateVR.jpg)
-
Sorry i forgot that FloatMultiplyTarget was a custom action, you can just swap it out for float multiply if you want.
I updated the package so it should work now.
-
I am a little lost, I understand less and less what to do. The left stick to move forward still works well.
I have lots of valve errors.
(http://www.maximages.fr/forums/3D/playmaker/manette.jpg)
-
Two things.
1: In the inspector CameraRig should be your [CameraRig] and not your CameraVR.
(https://i.imgur.com/ORG4qkm.png)
2: Vector2Action in the inspector should be TouchpadAxis.
And then in Unity got to window / SteamVR Input.
Add a Vector2 action to the list, name it TouchpadAxis and press save and generate.
(https://i.imgur.com/eweR4rb.png)
Open BindingUI > Current Binding > Edit.
On Thumbstick press the + symbol > Use as Joystick.
Set the position on this new Joystick to TouchpadAxis.
(https://i.imgur.com/6P2OCKl.png)
Profit. :P
-
Should I put CameraRig in FSM instead of Camera?
I have this error
NullReferenceException: Object reference not set to an instance of an object
Valve.VR.SteamVR_Input_Source.GetHandle (SteamVR_Input_Sources inputSource) (at Assets/SteamVR/Input/SteamVR_Input_Source.cs:29)
-
Don't change anything in the FSM itself.
Just make sure you have these settings in the inspector.
(https://i.imgur.com/ORG4qkm.png)
If things don't work after that, you probably made a mistake with setting up your SteamVR action.
Your unity version 5 is also pretty old and i have no idea if that might cause problems because i haven't tested this package in unity 5.
*Edit*
I tried using the package on Unity 5.6 but no luck, in my case it just crashes. Unity 5.6 is just to old so i'm afraid i cant help you any further.
-
it does not matter. Thanks for spending time with me.
Have a nice day