Quantcast
Channel: Latest Questions by 07Mr07
Viewing all articles
Browse latest Browse all 59

Move camera slow on X axis

$
0
0
Hi, I need move camera +10 on X axis when press button like this: void FixedUpdate() { if(Input.GetKeyDown(KeyCode.A)) transform.position = new Vector3(transform.position.x + 10f ,transform.position.y, transform.position.z); if(Input.GetKeyDown(KeyCode.D)) transform.position = new Vector3(transform.position.x - 10f ,transform.position.y, transform.position.z); } This works but the movement is too fast, I want change the position with a lower 'velocity'. I tried Lerp but doesnt work nice. Thanks.

Viewing all articles
Browse latest Browse all 59

Latest Images

Trending Articles



Latest Images