Jump to content

Switching hands at runtime


Recommended Posts

For my bowling game, do you have sample code for switching hand right to left and left to right at runtime please ?

cause i have multiplayer offline and each player play turn to turn, maybe some are left handed, other right handed, i d like to add an option for save in memory each player which hand have.


Link to comment
Share on other sites

this is the code i do, for have left hand , and right hand at statup the game in focus.


	private void CheckHandActive(){		if (WaveVR_Controller.Input(WVR_DeviceType.WVR_DeviceType_Controller_Right).connected)		{			if(WaveVR_Controller.IsLeftHanded){				rightHandController.SetActive (false);				leftHandController.SetActive (true);				userIsLeft = true;			}else{				rightHandController.SetActive (true);				leftHandController.SetActive (false);				userIsLeft = false;			}		}	}


with this code, it is ok. it is more simple like other code WaveVR_ControllerManager.

the particularity is, i need to use a right and type mode on lefthand gameObject. if i put left type, it doen't work !? that is very strange.


So after, i want to switching at runrime with a menu (What is your hand ? Right or Left ?)


i try this code but It blocked, i lost controller, it disapear.


public void ChangeHandToLeft(){	        WaveVR_Controller.SetLeftHandedMode (true);		rightHandController.SetActive (false);		leftHandController.SetActive (true);		userIsLeft = true;	}	public void ChangeHandToRight(){	        WaveVR_Controller.SetLeftHandedMode (false);		rightHandController.SetActive (true);		leftHandController.SetActive (false);		userIsLeft = false;	}

can you ask to a developper please ? for know why left type display the right hand ? and how switch.


Gige us the right code please ... you use in the menu of vive focus in settings.





Link to comment
Share on other sites

Hi ,


After checking, your code doesn't work because it's blocked due to design philosophy.

In current design we assume all hand switch is selected from setting on our Launcher.

I can imagine in your multiplayer game, you'd like each player can select right/left hand on their turn.

I'll raise this request internally how we can provide.



Link to comment
Share on other sites

Oh heard, yes it was to improve the gameplay in case there will be more players with the same HMD and if one of them is left-handed.


Ok I understand that it is before the launch of the application that it is necessary to parameter this choice. So hoping that there is not too much left-handed in the world who wants to play bowling on the Focus.

I will try to make a multi player online one to one, it could be nice.

Ok thank you for putting the info back to your teams.

I was wondering if it is possible to have two controllers with the Vive focus?

is it possible to order a single controller? because mine has fallen several times and it sometimes seems buggy and no longer hold the trigger Get pressed continuously. I sometimes have trouble grasping my object for example.

Tell you soon
Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...