Hi all, I need help to move the camera to 45 degrees with the left mouse button and when the button is released, the camera returns to its initial state, thank you if someone helps me do it.
1 Answer
1You need to be alot more specific about what you want to to do but im guessing you want something like this you’ll likely need to tweek it abit though.
function Update(){
if(Input.GetMouseButtonDown(0)){
Camera.main.transform.rotation.eulerAngles.z=45;
}
if(Input.GetMouseButtonUp(0)){
Camera.main.transform.rotation.eulerAngles.z=0;
}
}
Maybe post the script code that you do have, and we can help you fix any problems in it.
– Graham-Dunnett