Basically, I’m asking if it’s possible to move a parent object with the rigidbody component without effecting it’s child’s rigidbody physics. While keeping the child’s physics properties.
I have it setup where I have the Parent Rigidbody game object, contain a child rigidbody object and a series of springs connected to that child rigidbody.
So if i move that parent game object using Rigidbody.MovePosition(). The child object would be springing around accordingly based on how the parent is moved.
But I actually don’t want the parent’s movement to be effecting the child’s physics.
That can actually be accomplished if i move the parent game object using transform.position. This would actually move the parent game object without causing the child objects to spring around. HOWEVER…a new problem arises. High speed collisions with my objects would no longer be reliable, because im using transform.position, instead of rigidbody.MovePosition.
Since my game requires solid and reliable high speed collision detection, I had the Parent game object have a rigidbody component with collision detection set on continuous, including all child and other objects.
So I’m in a bit of a conundrum here…
Method One: I get proper high-speed collisions, but unwanted physics movements of my child objects.
Method Two: I get bad high-speed collisions, but correct physics movements of my child objects.
I was hoping there was just some simple line of code I could right to just ‘Disable transferring physics’ to child objects. but…there isn’t.
I would have thought that it should be fairly common for some objects to have seperate physics reactions in children.
Any tips would be great, thanks!
Take a look at this video to see what I mean…(Forgive my placeholder graphics).
What’s going on here is that when I move the red circle around the two boxes are supposed to move and rotate in a specific way.
In the first half of the video, it moves but with a lot of bounce and spring, because it has a child object which has the box attach to some springs. Here I’m using rigidbody.moveposition.
In the second half of the video, it moves nice and swiftly following the red circle like it’s supposed to. And the box actually still has it’s springy physics if another rigidbody object were to collide or bounce on it…The only downside to this is that, because I’m using transform.position instead of rigidbody.moveposition. My collisions aren’t reliable, high speed objects fall through them, etc…