RotateAround

hello sorry for my English, good I’m working on a project android, I am rotating the camera with RotateAround function, but this function revolves euler angles and constantly rotating angle x per second or frame, I want to do is to rotate at a certain fixed angle.

transform.RotateAround(punto.position, Vector3(0,-1,0), 10 * Time.deltaTime);

uhm, then call it just once and your good to go… no?

// rotate by 35° if executed once.
transform.RotateAround(punto.position, Vector3(0,-1,0), 35);

If you mean to smoothly rotate by a certain angle and then stop, there are several ways to do that. Picking up on your RotateAround approach, you could do:

private var totalAngle=0:float;

function Update(){
    // rotate by 35° in total over several frames
    if(totalAngle<35){
        transform.RotateAround(punto.position, Vector3(0,-1,0), 10 * Time.deltaTime);
        totalAngle+=10 * Time.deltaTime;
    }
}

thanks, well look I’m developing an application for Android which uses the accelerometer, I have acelerometrso values ​​which are in x-axis from -50 to 50 and so when when the value is less than 0, the motion is right, I want to do is to rotate about a fixed point when the accelerometer is in this setting and turn 45 degrees and stops.

following is my code is:

function Update ()
{

dirCam.x = -Input.acceleration.normalized.y * 50;
dirCam.y = Input.acceleration.normalized.x * 50;
 	
rot.x= -Input.acceleration.y;
rot.y=Input.acceleration.x; 

        
if (dirCam.x<-1 && dirCam.x>-50)
	{	
		
		transform.RotateAround(punto.position, Vector3(0,-1,0),angle*Time.deltaTime);
		
 		
  	}
	else
	{
		if (dirCam.x>1 && dirCam.x<50)
		{ 		
			transform.RotateAround(punto.position, Vector3(0,1,0),angle* Time.deltaTime);
					
		}	
		
			
	} 

}