SHARE
TWEET

fhdfj

a guest Feb 16th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  public override void ExecuteCommand(Command command, bool resetState)
  2.     {
  3.         PlayerCommand cmd = (PlayerCommand)command;
  4.  
  5.         if(resetState)
  6.         {
  7.             transform.position = cmd.Result.position;
  8.             movement = cmd.Result.velocity;
  9.         }
  10.         else
  11.         {
  12.             movement = new Vector3(cmd.Input.horizontal, 0, cmd.Input.vertical);
  13.             movement *= BoltNetwork.FrameDeltaTime;
  14.             movement *= 5; //Speed
  15.        
  16.             //controller.Move(movement);
  17.             transform.Translate(movement);
  18.  
  19.             cmd.Result.position = transform.position;
  20.             cmd.Result.velocity = movement;
  21.         }
  22.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top