Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. void FixedUpdate()
  2. {
  3. dp = Vector3.Distance(planet.position, transform.position);
  4. distance = maxDistance - dp;
  5. force = distance * gravity;
  6. Debug.Log(force);
  7.  
  8.  
  9. direction = new Vector2(
  10. direction.x + (1f * force),
  11. direction.y + (1f * force)
  12. );
  13. Debug.Log(direction);
  14. //transform.position = direction;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement