How to make instantiated rigidbodies continue moving the in the same direction as destroyed object?
So I have a script, which is supposed to destroy the Rocket and instantiate pieces, when the Rocket is colliding with some object. But for the test, I made it happen when I press a button. The question is how can I make the instantiated pieces move in the same direction and with same speed as the Rocket?
here is a gif what is like now: https://i.imgur.com/9pk8apS.gifv
edit: after the rocket breaks, the pieces are moveable as they have coliders and rigidbodies
Answer by Infenix · Apr 06, 2020 at 05:35 PM
Store the rigidbody.velocity value and assign it to instantiated rigidbody, it will keeps its direction and speed.
Your answer
![](https://koobas.hobune.stream/wayback/20220612230651im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Had to turn off gravity scale, but now player goes through walls 0 Answers
Moving slows decent with Rigidbody 2D 0 Answers
Rigidbody2D and Slopes,Rigidbody2D an Slopes 0 Answers
The player falls down a ladder 0 Answers
Limiting backwards speed 0 Answers