Untitled
Never
public class PlayerMouvement : MonoBehaviour { private float rad; private float deg; private Rigidbody2D body; public float Speed; void Start() { body = GetComponent<Rigidbody2D>(); } void FixedUpdate() { Vector2 Target = Camera.main.ScreenToWorldPoint(Input.mousePosition); //Target.z = transform.position.z; float deltaX = Target.x - transform.position.x; float deltaY = Target.y - transform.position.y; //transform.position = Vector3.MoveTowards(transform.position, Target, Speed * Time.deltaTime / transform.localScale.x); float rad = Mathf.Atan(deltaY / deltaX); Debug.Log(rad); if (rad > 0) { Debug.Log("Angle is greater than 0, so should be between 0 and 90."); // Going down and to the left, so convert to Quadrant III if (deltaX < 0) { Debug.Log("Moving to the left with deltaX = " + deltaX + ", so convert to Quadrant III"); rad = Mathf.PI + rad; } else { Debug.Log("In Quadrant I, so keeping angle of " + rad); } } // Initial angle is -90-0, so either in Quadrant II or Quadrant IV else if (rad < 0) { Debug.Log("Angle is less than 0, so should be between -90 and 0."); // Going to the left, so convert to Quadrant II if (deltaX < 0) { Debug.Log("Moving to the left with deltaX = " + deltaX + ", so convert to Quadrant II"); rad = Mathf.PI - rad; } // Going to the right, so convert to Quadrant IV with a positive angle value else if (deltaX > 0) { Debug.Log("Going to the right, so in Quadrant IV. Converting from " + rad + " to " + ((Mathf.PI * 2) - rad)); rad = (Mathf.PI * 2) - rad; } } // Angle is 0, so need to check if actually 0 or 180 deg else { if (deltaX < 0) { rad = Mathf.PI * 2; } } deg = rad * Mathf.Rad2Deg; body.MovePosition(new Vector2((transform.position.x + ((Speed * Mathf.Abs(Mathf.Cos(rad))) * Time.fixedDeltaTime / transform.localScale.x)), transform.position.y + ((Speed * Mathf.Abs(Mathf.Sin(rad))) * Time.fixedDeltaTime / transform.localScale.y))); if(deltaX < 0) { } } }
Raw Text
-
Fucking the boss's wife at a party to orgasm. She moans with pleasure and takes cum in her mout
14 min ago
-
https://go90-keto-gummies-get.company.site/
14 min ago
-
https://go90-keto-gummies-get.company.site/
14 min ago
-
weltowel
19 min ago
-
MA'e
23 min ago
-
https://go90-keto-gummies-get.company.site/
23 min ago
-
Abby and Bryana Lesbian Strap-On Fucking
44 min ago
-
Just chill and fuck at home
1 hour ago
-
EVILANGEL Sexy Romanian Student Seduces Tutor into Anal Fuck - Alyssa Bounty
1 hour ago
-
🌚🌠R@PED😏 SLEEPING💤 LITTLE GIRLS🙈👧🍬✨🌝
2 hours ago