Skip to main content
formatting
Source Link
John Hamilton
  • 3.1k
  • 1
  • 17
  • 34

I have recently written about this issue. I will say it here again so that it may be of use:

Use the existing Physics2D. Don't reinvent the wheel. There's a component called PointEffector2D, you're trying to achieve its effects manually, which will end badly if it's not implemented correctly.

Here's the manual whatfor effectors. What you want, is to have inverse squared force mode with a negative number as the force. You don't need a rigidbody on the planet but you do need a Collider2D that will be used by effector.

I have recently written about this issue. I will say it here again so that it may be of use:

Use the existing Physics2D. Don't reinvent the wheel. There's a component called PointEffector2D, you're trying to achieve its effects manually, which will end badly if it's not implemented correctly.

Here's the manual what you want is to have inverse squared force mode with a negative number as the force. You don't need a rigidbody on the planet but you do need a Collider2D that will be used by effector.

I have recently written about this issue. I will say it here again so that it may be of use:

Use the existing Physics2D. Don't reinvent the wheel. There's a component called PointEffector2D, you're trying to achieve its effects manually, which will end badly if it's not implemented correctly.

Here's the manual for effectors. What you want, is to have inverse squared force mode with a negative number as the force. You don't need a rigidbody on the planet but you do need a Collider2D that will be used by effector.

Source Link
John Hamilton
  • 3.1k
  • 1
  • 17
  • 34

I have recently written about this issue. I will say it here again so that it may be of use:

Use the existing Physics2D. Don't reinvent the wheel. There's a component called PointEffector2D, you're trying to achieve its effects manually, which will end badly if it's not implemented correctly.

Here's the manual what you want is to have inverse squared force mode with a negative number as the force. You don't need a rigidbody on the planet but you do need a Collider2D that will be used by effector.