salahzar

VRC_button_A_matt1.cs

Feb 28th, 2021
673
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. using UdonSharp;
  3. using UnityEngine;
  4. using VRC.SDKBase;
  5. using VRC.Udon;
  6.  
  7. public class VRC_button_A_matt1 : UdonSharpBehaviour
  8. {
  9.     public Transform target;
  10.  
  11.     Vector3 aperta = new Vector3(-0.207f, -1.63f, -0.56f);
  12.     Vector3 chiusa = new Vector3(-0.207f, 1.197f, -0.56f);
  13.  
  14.     void Start()
  15.     {
  16.         Debug.Log("started VRC_button_A_matt1");
  17.         target.localPosition = chiusa;
  18.     }
  19.     public override void Interact()
  20.     {
  21.         if(target.localPosition == aperta)
  22.         {
  23.             target.localPosition = chiusa;
  24.         } else
  25.         {
  26.             target.localPosition = aperta;
  27.         }
  28.         Debug.Log("changing position to " + target.localPosition);
  29.     }
  30.  
  31. }
  32.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×