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.
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.