I\'ve ran into a problem.
The basic setup I have right now, two objects: my camera, and my player object.
The player moves via Transform on WASD, and is supp
I'm not sure If I understand what you are trying to do. If you are trying to do something similar to the game "Dead Nation", then I would suggest something like this:
void Update()
{
Vector3 mouse = Input.mousePosition;
Vector3 mouseWorld = Camera.main.ScreenToWorldPoint(new Vector3(
mouse.x,
mouse.y,
player.transform.position.y));
Vector3 forward = mouseWorld - player.transform.position;
player.transform.rotation = Quaternion.LookRotation(forward, Vector3.up);
}
If you want the camera to move and rotate along with the player then just make the camera a child of the player object.