Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public override void ExecuteCommand(Command command, bool resetState)
- {
- PlayerCommand cmd = (PlayerCommand)command;
- if(resetState)
- {
- transform.position = cmd.Result.position;
- movement = cmd.Result.velocity;
- }
- else
- {
- movement = new Vector3(cmd.Input.horizontal, 0, cmd.Input.vertical);
- movement *= BoltNetwork.FrameDeltaTime;
- movement *= 5; //Speed
- //controller.Move(movement);
- transform.Translate(movement);
- cmd.Result.position = transform.position;
- cmd.Result.velocity = movement;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement