Prevent child from overlapping with parent, without being subject to physics
Hello everyone,
I'm messing around with Unity (as most beginners do) and I've stumbled upon this problem... I have 2 spheres that I can control independently. One sphere is the parent of the other. If I move the first sphere, the other moves the same way (as intended). The second should move freely but shouldn't overlap the first.
I've tried adding a Rigidbody to each of them but when they collide, the spheres start to scatter, due to the effects of physics, and I don't want physics to have any effect. (that excludes joints for that reason because they need Rigidbody)
I've also tried saving the transform of both sphere in FixedUpdate, doing the movements just after in the same method and then reinitializing the transforms to their saved state with OnTriggerEnter (using colliders on those children with "Is Trigger" ticked), but without success.
The test is reduced to 2 spheres for now but I intend adding other spheres in a cascade of children.
Does anyone have any idea how to proceed? Thank you in advance.
Your answer
Follow this Question
Related Questions
Colliding with other objects. How to stop it? 1 Answer
Collision Detection on Rb with Interpolation and Rb with Extrapolation does not work the same way. 0 Answers
Audio source zones overlap, how to avoid 0 Answers
Changing mesh filter component of prefab when other object stops overlapping 1 Answer
Graphics issue with the Unity 2017.1 native Google cardboard sdk 0 Answers