Hello, I successfully imported the example Advanced Walk and Blend, from Character Animation tutorial. I would like to implement the Mouselook when the user press the left mouse button and I can not. Means: player walk and turn when WASD or arrows keys are pressed, but, when left mouse button, the camera look around. Please help :shock:
You should be able to do this with a couple of well-placed “if” statements. You can use Input.GetMouseButtonDown to get the button status, so you need something like:-
if (Input.GetMouseButtonDown(0)) {
// Keyboard input code
}
…on the camera script and
if (!Input.GetMouseButtonDown(0)) {
// Keyboard input code
}
…on the player control script.