Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void FixedUpdate()
- {
- dp = Vector3.Distance(planet.position, transform.position);
- distance = maxDistance - dp;
- force = distance * gravity;
- Debug.Log(force);
- direction = new Vector2(
- direction.x + (1f * force),
- direction.y + (1f * force)
- );
- Debug.Log(direction);
- //transform.position = direction;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement