Hey there,
I like to do a game, which you have an object that is jumping, depending on which place you clicked at it. Now I already have this function:
Vector3 Center = this.transform.position;
Vector3 forward = Vector3.up;
Vector3 clickedPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Vector3 forceDirection = (Center - clickedPosition).normalized;
but it doesn’t look so good without rotating from the direction you clicked. That’s the problem. I need help to addTorque that rotates at the opposite direction you clicked. Both left and right (z-axis). I hope everybody will understand…