mgm Posted May 20 Share Posted May 20 Hello, I'm new to HTC and Wave XR and I wanted to do a simple project to grab objects when pressing grip button. I am trying to include the Wave Rig and WaveLeft and WaveRight controllers with the InteractionModeManager (For later include eye tracking). To the controllers prefabs I added the Custom Grabber. However, this is not working at all as the InteractionModeManager is adding its own controllers apart from the ones that I added and my game is just catching the controllers added by the InteractionModeManager. Anyone that is more used to this can help me? Thank you! Link to comment Share on other sites More sharing options...
mgm Posted May 20 Author Share Posted May 20 (edited) 55 minutes ago, mgm said: I update my question now: Hello, I'm new to HTC and Wave XR and I wanted to do a simple project to grab objects when pressing grip button. I am trying to include the Wave Rig and WaveLeft and WaveRight controllers with the InteractionModeManager (For later include eye tracking). I am having the problem that the controllers are not moving with my controllers, they remain in the same position. But when I press grip or trigger they look like they are being pressed. Anyone that is more used to this can help me? Thank you! Edited May 20 by mgm Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted May 21 Share Posted May 21 Hi @mgm, We don't provide an integrated function for "controller grab". To come out this feature you don't need to use Interaction Mode Manager. Just use WaveRig: from Packages > VIVE Wave XR Plugin - Essence > Runtime > Prefabs WaveLeftController and WaveRightController : from Assets > Wave > Essence > Controller > Model > {version} > Prefabs Now you have the head and controllers in your scene. The next step is to detect the collision between controller models and the object you want to grab. You can implement either "OnCollision" or "OnTrigger". When a collision occurs, detect the grab event by using Wave.Essence,WXRDevice.ButtonHold function to trigger your grab actions. GameObject grabbedObject = null; void OnTriggerEnter(Collider collider) { grabbedObject = collider.gameObject; } void Update() { if (WXRDevice.ButtonHold(WVR_DeviceType.WVR_DeviceType_Controller_Right, WVR_InputId.WVR_InputId_Alias1_Grip)) { if (grabbedObject != null) { //grabbedObject.transform.position = { set the position you want } } } } https://docs.unity3d.com/ScriptReference/Collider.OnCollisionEnter.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now