playMaker

Author Topic: Help with Trigger Event in VR [SOLVED]  (Read 264 times)

Adam Z

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Help with Trigger Event in VR [SOLVED]
« on: April 28, 2020, 03:17:47 PM »
Hey. So I'm trying to get my VR hand to trigger a collider but I can't get it to work.

I have a sphere that changes color when the box collider is entered. If I don't choose a Collider Tag, as soon as the player moves towards it the sphere changes color since the OVRPlayerController has a Character Controller attached (which has a capsule collider integrated).


As my VR hand I'm using a sphere as a placeholder. If I choose a Collider Tag in the 'Trigger Event' Action and set it as 'Player', and set my hand sphere Tag as 'Player', when I Play the scene and my hand sphere interacts with the cub collider, it does not work. I think it's because the hand sphere collider is within the Character Controller collider.  Is that's why it's not working, it has a problem when two colliders intersect? Any way around that?

Thanks!
« Last Edit: April 29, 2020, 11:35:23 AM by Adam Z »

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 200
    • View Profile
Re: Help with Trigger Event in VR
« Reply #1 on: April 29, 2020, 08:16:22 AM »
Hey Adam.

Have you tried adding a Rigidbody component to your hand and setting it to kinematic?

Either the object with the trigger on it or the hand should have a rigidbody for the trigger event to work.

To be sure add the "player" tag to your CameraRig and the "gamecontroller" tag to your controllers so that your body capsule collider doesn't set of the trigger.

And set your trigger action tag to "gamecontrollers".
« Last Edit: April 29, 2020, 08:18:00 AM by LordHorusNL »

Adam Z

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: Help with Trigger Event in VR
« Reply #2 on: April 29, 2020, 11:35:57 AM »
Have you tried adding a Rigidbody component to your hand and setting it to kinematic?

That worked, thanks!