- Home /
Pushing Objcts away from each other when things get in the way
I have a game dynamic which requires me to be able to push two object away from each other, like two magnets. I know how to do that. But what I'm struggling with is when 1 of those 2 magnets runs into a wall or other object. That opposing force which was previously split 50/50 now gets applied 100% to the magnet that's path is not blocked.
Another more complex example is 2 magnets of different weight or friction. The magnet which weighs less or has less friction is going to get pushed back further than the magnet which weighs more or has more friction. I was hoping there were some auto-magical built in unity function for this type of thing. Something which says push these two apart by this force and it would handle all the extra stuff of weights/friction/collisions. If anyone has any resource that they think would be helpful, please do share!
Thanks, Corey
Your answer
Follow this Question
Related Questions
How to reduce physic force? 0 Answers
Making objects jump into the air. Giving them sudden Force? 0 Answers
Springjoint transmit wrong forces 0 Answers
Adding Forces. Making It Move Strangely. 0 Answers
Change materials of connecting objects 0 Answers