- Home /
Apply same amount of force even after gameObjects are fixed joint
In my 2D game, OnCollisionEnter2D:
void OnCollisionEnter2D(Collision2D col){
FixedJoint2D myjoint = gameObject.AddComponent<FixedJoint2D>();
myjoint.connectedBody = col.rigidbody;
}
Each gameObject have this script. gameObjects joins after they collide with each other. Now the problem is that the velocity of throw decreases after gameObjects are joint with each other. I want same throw force to work as when they were not joint.
ps: I thought applying same force to all the joint gameObjects might work. But I'm not sure how to do that.
Comment