SFE_moveThis.js 406 B

123456789101112131415161718192021222324
  1. var translationSpeedX:float=0;
  2. var translationSpeedY:float=1;
  3. var translationSpeedZ:float=0;
  4. var local:boolean=true;
  5. function Update () {
  6. if (local==true){
  7. transform.Translate(Vector3(translationSpeedX,translationSpeedY,translationSpeedZ)*Time.deltaTime);
  8. }
  9. if (local==false){
  10. transform.Translate(Vector3(translationSpeedX,translationSpeedY,translationSpeedZ)*Time.deltaTime, Space.World);
  11. }
  12. }