I have this script, that already works I,m using leanFinger Code (CSharp): var c = Camera.main; var center = rb.position; var lastPos = _finger.GetWorldPosition(c.transform.position.y, c); var lastDelta = Vector3.Distance(center, lastPos); float angle = Mathf.Atan2(lastPos.x, lastPos.z) * Mathf.Rad2Deg; rb.rotation = Quaternion.Euler(new Vector3(0, angle - initialRotation, 0)); The problem is that my object is rotating in absolute angles, so if it is already rotated, there is a unwanted rotation. I want it to take an initialRotation value, but i don't know how. Thanks
Lets say i have an object rotated 45° in Y axis (this value is not static). I want to rotate it in Y axis by the exact same degrees than _finger from its center. Later, i could just release it, and then rotate it again, like a gear