Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I want to know the method of changing the bike's max turn value.
#1
I want to let bike turns 90 degrees to the left or right. So, I found the parameter named "MaxTurn" in the VZPlayer script. But it cannot change the bike's max turning degree when I adjust the MaxTurn value. Is there any parameter can work for it or any function can be called for it?
Reply
#2
Ok, we're talking about the VZfit SDK here.

The MaxTurn parameter is the right place to start, but you may also need to adjust LeanIn and LeanFudge.

MaxTurn dictates the limit, in radians, of the avatar movement direction relative to your rest direction. The default is 0.5, for 90 deg set it to 1.57.

LeanIn determines how much the avatar turns to actually follow it's movement. The default is 0.5, set it to 1.0.

LeanFudge determines how much your head offset or tilt (depending on VR platform) affects avatar movement direction. The default is 2, but if you're tripling MaxTurn you may want to triple this to 6.

Note you may find this pretty uncomfortable which is why we have lower values for our games!
Reply
#3
Thank you very much. Those values are working successfully, but there is another problem happened while turning 90 degrees to left or right. The bike will automatically go back to the default direction when the avatar stops. I want to keep the movement direction after releasing the A, D key, so what should I do to resolve it.

Thanks for reading it.
Reply
#4
To fix that set VZPlayer.RotateAtStop true, and set VZPlayer.SlowRotateLimit to 1
Reply
#5
Is there any way to synchronize orientation of HTC Vive Headset to the bike's?

The solution that set VZPlayer.RotateAtStop true, and set VZPlayer.SlowRotateLimit to 1 is not working. So, we want to change another way to fix it.
Reply
#6
That solution only works if you also lean. If you want the bike rotation to just follow your head, then you can set it to the same rotation after VZPlayer.Update.

As an example you could subclass vzplayer and do like

override void Update () {
base.Update();
var angles = Controller.Head.eulerAngles
angles.x = angles.z = 0;
transform.eulerAngles = angles;
}
Reply
#7
Thanks for giving this solution. It can perfectly resolve the rotation problem. However, we hope that the bike can move along the changed orientation after adjusting the variable "mRigidbody.velocity" , but it didn't work well. So, I want to know whose direction the Bike depends on when moving, or how could I make bike move along the forwarding direction of itself.
Reply
#8
I think you are talking about overriding VZPlayer so much that it may not make sense to use.

VZPlayer was designed to use VZController data to move and turn in ways that reduce simulation sickness, as described in [url="https://www.virzoom.com/2019/01/03/vr-that-moves-you/"]this blog post.[/url]

But you don't have to use it, you can just put the VZController.prefab into your scene instead, and call ConnectBike() and other things on it like VZPlayer.cs does and apply your own character and camera motion.

Or you can modify VZPlayer.Update() directly to specify the camera and camera motion you want, instead of what our plugin returns.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)