unity – Simulating the behaviour of small objects coming to relaxation on the floor of an asteroid, 2D

unity – Simulating the behaviour of small objects coming to relaxation on the floor of an asteroid, 2D

[ad_1]

I’ve a big asteroid object, and I wish to use physics2D to have smaller objects be drawn to it as if by gravity, and are available to relaxation on its floor. The asteroid itself can be a dynamic physics2D object to permit it to float round, and obtain transferred momentum from impacts.

My present association on the asteroid object is:

  • Smaller CircleCollider2D on floor of asteroid asset for collisions
  • RigidBody2D
  • Bigger CircleCollider2D for level effector
  • PointEffector2D with damaging pressure to draw objects

Different objects are simply colliders and rigidBody2D’s

The issue is that when an object involves relaxation on the floor of the asteroid, because it has not reached the precise level effector coordinates, a pressure continues to be utilized to that object within the path of the purpose effector ie heart of the asteroid. This pressure in flip will get imparted on to the asteroid, and if a number of objects construct up in a sure path the asteroid will transfer in the wrong way.

How can I approximate the conduct of an actual asteroid whereby an object will impart some momentum on impression, however as soon as they arrive to relaxation the forces attain equilibrium?

Clearly in actual life the middle of gravity could be barely altered, I do not want that stage of precision. I simply don’t need the asteroid zipping round.

I’ve tried utilizing the collision masks / matrix. I cannot discover a configuration that each permits the asteroid to collide with the smaller objects, however not obtain the pressure imparted by them after colliding.

[ad_2]

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply