Question by
Yoxstar · May 27, 2017 at 10:38 AM ·
rigidbody2dphysics2d
Want to create trapped 2D rigidbody inside a hollowed out box with rigidbody of its own and then move them through script
I have already created this structure of a 2d rigidbody doll inside of a hollowed out box and everything works perfectly. Until i spawn this game object and make it move through script. I am using the rigidbody.MovePosition method to get the movement desired but when I do that the two bodies detach from each other and the box follows the script movement but the doll inside just falls down on the ground. Is there is any way to achieve this behavior without using physics to move the box?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612122914im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
2D Physics not working correctly 1 Answer
Climbing code problem (2d physic). 0 Answers
Arkanoid-like bounce troubles 1 Answer
Adding velocity to an object in a brick breaker game 0 Answers
Player slides off moving platform 0 Answers