child moving with parent and moving with friction ?
Hello guys,
I'll try to explain my problem as clearly as i can, eventually with pictures. I have to do a script of a vehicle, which can take some crates. Until this, no problem. But when i take a crate and i move it up, then the crate will move twice as the vehicle. Ok, here's what i mean :
When I pick a crate, the crate become child of the vehicle. I used to set the crate in kinematic while the crate is picked up by the vehicle, but i want the crate to be pushed by a wall for example, so now i keep the rigidbody in default.
So in this image, the crate is loaded up by the vehicle, and it's a child of the vehicle, but it still has a rigidbody.
Now, if I want to go forward with the vehicle (or backward), the crate which is supposed to "follow" the vehicle will move twice faster forward (or backward).
So i don't know how can i solve this. I think that maybe the crate move once because it's a child of the vehicle, but twice because it still has friction and as the vehicle is moving through velocity, the crate may still be pushed forward.. (?)
If anyone has an idea..
EDIT: I tried to set the friction to 0, and indeed it doesn't move twice. But of course this isn't a solution because if i hit a wall, the crate will slide on the vehicle and this is far from what i want. But it confirms that the objects moves because of the friction and because of the parent/child link.
Your answer
Follow this Question
Related Questions
Keeping rigidbody-objects connected to their parents 2 Answers
Child with Rigidbody doesn't move with Parent with Rigidbody 3 Answers
Prevent local movement of child with Rigidbody? 1 Answer
Can not access GetComponentInParent ( ). usegravity 1 Answer
How can I check to see if a GameObject is a Child of another GameObject 0 Answers