Hi folks,
I'm working on a top-down 2D game where the player navigates around objects that attract/pull the player affecting their path through the level. The player has an Obi Rope (and Solver) attached to him, kind of like a long tail.
The Physics 2D gravity (in project settings) and the Solver.gravity are set to zero. I have set-up an attraction system using Rigidbody2D.AddForce() which attracts the player towards the different "attraction objects", depending on distance.
I set all the rope's CP masses to 0. This is because as the rope moved/waved around, it was affecting the character's center of mass, making the control difficult.
When the character collides with an attraction object, he naturally sticks there due to the force of attraction. The rope currently just drifts/floats around when the character is stuck to an attraction object, as expected in zero gravity and with zero-mass.
I need the rope to also stick to this attracting object with the same force the character is attracted.
What do you recommend I do to get this working? Could I increase the mass of the particles (or CPs) directly at runtime when the character is in contact with an attraction object? Should I use the Solver.gravity or Solver.externalForces to control this?
Also, what's the difference between using Solver.gravity and Solver.externalForces from the perspective of a particle?
I'm working on a top-down 2D game where the player navigates around objects that attract/pull the player affecting their path through the level. The player has an Obi Rope (and Solver) attached to him, kind of like a long tail.
The Physics 2D gravity (in project settings) and the Solver.gravity are set to zero. I have set-up an attraction system using Rigidbody2D.AddForce() which attracts the player towards the different "attraction objects", depending on distance.
I set all the rope's CP masses to 0. This is because as the rope moved/waved around, it was affecting the character's center of mass, making the control difficult.
When the character collides with an attraction object, he naturally sticks there due to the force of attraction. The rope currently just drifts/floats around when the character is stuck to an attraction object, as expected in zero gravity and with zero-mass.
I need the rope to also stick to this attracting object with the same force the character is attracted.
What do you recommend I do to get this working? Could I increase the mass of the particles (or CPs) directly at runtime when the character is in contact with an attraction object? Should I use the Solver.gravity or Solver.externalForces to control this?
Also, what's the difference between using Solver.gravity and Solver.externalForces from the perspective of a particle?