Question by
manipalsingh · Jun 17, 2016 at 09:21 PM ·
physicsrigidbodycamera-movementtouch controls
Move camera with touch
Hey all.... I'm trying to pan around the scene(2d) using touch controls. I'm doing this by providing impulse to camera (having rigidbody) in the direction of deltaPosition. I have added some drag to my camera rigidbody. I have added below impulse in TouchPhase.moved :
this.GetComponent().AddForce(-1 * deltaPosition, ForceMode.Impulse);
Camera is moving around fine but I want to determine the final position where my camera will stop.
Any help here would really be great.
Comment