How do I use the growth (increasing scale) of an object to apply force?
I have an orb object floating in space. No gravity, no drag, no friction. It's a 3D sphere primitive, but since it's in a 2D environment I have a Collider2D and a RigidBody2D component on it. The Orb objects I'm using have a script attached to them that, among a number of other things, cause the spheres to linearly increase in size when they are instantiated from a scale of 0,0,0 to 1,1,1 over a period of 1 second (configurable).
When I instantiate one new Orb right next to an existing one, the Collider2D attached to it will push the other Orb out of the way. Which is great. That's what I want it to do. However the act of pushing it out of the way does not apply any force, so it will make it "scrooch" over, but it will not then stop leaving the to spheres right next to one another.
I assume this is because the act of changing the scale of an object is a kinematic action that does not interact with the physics engine.
The code that increases the scale of the Orb runs in the Fixed Update event, and the time over which the Orb grows is calculated by increasing the scale on every fixed update by a factor of time of the fixed update divided by the growth time. I used Fixed Update because my hope is to somehow make this scaling action affect the physics engine in such a way that growing the object would be interpreted as movement that would translate to a force.... unfortunately I do not have access to my code ATM, but that sums up the method that is being used.
How can I make the act of scaling up an object apply force to whatever it touches along with itself?
Your answer
Follow this Question
Related Questions
How do I get objects in front of the player to be blasted away? 1 Answer
Physics.BoxCast not returning a hit when scale too small 0 Answers
How do I smoothly scale objects with bones? 0 Answers
Door hinge joints 0 Answers
How to make rigidbody not effect movement while still using it for collisions? 0 Answers