- Home /
Camera rotation problem!!
How can i do that:
i want to do something like this (the camera movement): Clic here
Answer by henry96 · Sep 11, 2011 at 08:24 AM
You can use eulerAngles
to rotate your camera.
For example : if (Input.GetButtonDown("Jump")) {
transform.eulerAngles.x ++;
}
or you can use
transform.Rotate(Vector3(1,0,0));
To make the camera rotate forward and rotate back to the original position you will need to use boolean!
For instance :
var pressing : boolean = false;
if (Input.GetButtonDown ("Jump")) {
pressing = true;
//make the camera rotate to the direction you want
}
if (Input.GetButtonUp ("Jump")) {
pressing = false;
//Make the camera rotate back to its original rotation
}
These are just the basic script to get you understand about what you need to do.
Hope this help! Cheer! ^^
i want to do something like this (the camera movement):
Your answer
Follow this Question
Related Questions
camera rotation with mouse,like minecraft 2 Answers
How to do isometric camera 1 Answer
Using the same controller button twice 2 Answers
Switching multiple cameras 0 Answers
Js to c# conversion 1 Answer