public void Set(JSON.Orientation newOrientation) { rc.operations.Enqueue(() => { rc.transform.position = new Vector3(newOrientation.pos.x, newOrientation.pos.y, newOrientation.pos.z); rc.transform.rotation = Quaternion.Euler(newOrientation.rot.x, newOrientation.rot.y, newOrientation.rot.z); rc.rb.velocity = Vector3.zero; rc.rb.angularVelocity = Vector3.zero; }); }
public Orientation(RobotController _rc) : base(_rc) { jsonOrientation = new JSON.Orientation(); }