- Home /
How do you make a shoot up feature like in dx-ball?
Im in the middle of making a breakout game, and i want to make it so that when you start the level, and when you lose a life and want to start of the ball agian you "shoot" it from the paddle like in this video: http://www.youtube.com/watch?v=BXEk0IHzHOM, atm i have it so it just spawn above the blocks, and before that it was random on a specific x position line(this does not matter just saying, it don't really work in this kind of game :p)
Answer by Landern · Mar 05, 2013 at 02:58 PM
The quick and dirty of it. Make the ball a child of the parent(paddle). When the user clicks the mouse button or hits the launch key on the keyboard(or whatever), the ball's parent is null and you give it some force or however you are doing.
When the ball is a child of the paddle, it will move where the paddle moves up and until you launch and null the ball's parent.
Answer by drop_m · May 03, 2014 at 08:37 AM
when you lose your ball, if it's a prefab, you can instantiate it just above the paddle After that, in FixedUpdate(), you have to maintain the ball in the initial position until you press [your release command] and than add a force to it
Your answer
![](https://koobas.hobune.stream/wayback/20220613093842im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Time in unity 2 Answers
I can't shoot back 0 Answers
Player flies PROBLEM 1 Answer
Bullets sometimes shoot under map 1 Answer