// Update is called once per frame void Update() { /* transform.forward = HolisticMath.QRotate(new Coords(transform.forward, 1), new Coords(transform.forward), 1).ToVector(); * transform.rotation = HolisticMath.QRotate().ToMatrix(); */ Coords coords = HolisticMath.Quaternion(axis, angle * Mathf.Rad2Deg); Vector4 quaternion = new Vector4(coords.x, coords.y, coords.z, coords.w); transform.rotation *= new Quaternion(quaternion.x, quaternion.y, quaternion.z, quaternion.w); }
// Update is called once per frame void Update() { Coords quaternion = HolisticMath.Quaternion(axis, angle); transform.rotation *= new Quaternion(quaternion.x, quaternion.y, quaternion.z, quaternion.w); // transform.forward = HolisticMath.Rotate(new Coords(this.transform.forward,0), // 1 * Mathf.Deg2Rad,false, // 1 * Mathf.Deg2Rad,false, // 1 * Mathf.Deg2Rad,false).ToVector(); }