Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Angry Birds: Snap to circle

$
0
0
In an angry birds game I have this code for lining up the bird to fling:

Code (CSharp):
  1.  if (Input.GetButton("Fire1") && !F)
  2.         {
  3.             mv = Camera.main.ScreenToWorldPoint(Input.mousePosition);
  4.             transform.position = Vector2.Lerp(transform.position,mv,1);
  5.             transform.right = transform.position - transform.localPosition;
  6.             if(transform.localPosition.x > 1)
  7.             {
  8.                 transform.localPosition = new Vector2(1, transform.localPosition.y);...
Angry Birds: Snap to circle

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>