Hi, I’m making a game that requires the player to use both the hands in VR to hit away balls being shot at them and this makes an integer count how many times the player hits the balls, but the single variable I made increments for each hand and not singularly for both hands.
This us the output when I only use one hand. Counter works fine.
And this is the output when both hands are being used. As you see the single variable now shows two values, one for each hand
This is the collision and increment I implemented.
As you are using two controllers, you have two BP_MotionController objects in your scene that independently keep track of the number of ball they hit.
What you need is to create a counter inside another class. For instance, inside your Player Controller class or inside your Pawn class. Once you’ve done that, you can keep the same logics but instead of incrementing the counter “Hit counter” located inside you “BP_MotionController”, you increment the one you created inside your Player Controller class (or Pawn class that’s up to you).