Guest User

Untitled

a guest
Apr 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. GameObject handPrefab=//YourHandPrefab added in editor, etc
  2. Vector3[] handPositions=//hand positions
  3.  
  4. if(yourUpButtonPressed){
  5.  
  6. handPositionIndex++;
  7. handPositionIndex=handPositionIndex%handPositions.Length; //this jumps back to 0 if Length reached
  8. handPosition.transform.position=handPositions[handPositionIndex];
  9.  
  10. }
Add Comment
Please, Sign In to add comment