Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

How can I rotate a Parent GameObject so a Child points towards the cursor?

$
0
0
The question says it all really, how can I rotate a parent GameObject so that a child of it points towards the cursor? I know I can find the cursor's location with
public Camera theCamera;
Vector3 mousePoint = theCamera.ScreenToWorldPoint(Input.mousePosition);

Viewing all articles
Browse latest Browse all 302

Trending Articles