- Home /
 
 
               Question by 
               zagahlo · Jul 10, 2013 at 10:00 AM · 
                camerartsbouncesmoothdamportographic  
              
 
              SmoothDamp bounce effect
I have a ortographic camera for a RTS game. When I approach the mouse to the screen borders, my camera moves harshly. So I decided to use Vector3.SmoothDamp to the Main Camera movement:
 transform.position = Vector3.SmoothDamp(transform.position, targetPosition, ref Vector3.zero, 0.5F);
 
               Camera moves correctly but, when I change the direction of movement, the camera movement makes a little bounce (for example, I am moving my camera to the right, and then I move my mouse to the left of the screen, my camera bounce a little to the right and then moves smoothly to the left)
Why that happens?
               Comment
              
 
               
              Your answer