- Home /
2D Physics, Pong ball is moving by itself!
I have a ball in a pong game I am making (start small, right?) :)
The problem is, it's haunted. The ball has been set with a rigidbody and collider (both appropriately 2D). So have the paddles, etc. I have set the gravity scale for the ball to zero.
If I start the game, nothing happens (as it should). However, if I move one of the paddles up or down, the ball will start to move on it's own after a few secodns! In addition, sometimes the ball will stop at the physics collider on the top of the level, but other times it goes right through!
It never seems to go through the collider on the bottom of the level, even though they are identical.
Any assistance would be helpful, if you need the project file I can easily upload it as well.
Thank you.
If you could send/post some of the script or the project I would love to see what is causing these issues.
The project is attached. The scene in question is in "Assets/Pawng/Level/PAwng"
Just hit play, move either paddle, and watch the madness (if the paddles get stuck, it's because I'm not even close to done. :))
https://www.dropbox.com/s/gkaby5b9r4pmh8s/2Dtutorial.rar
If link doesn't work, please let me know. Should be fine though.
Answer by prof · Nov 28, 2013 at 11:54 AM
Well, how about some ghostbusting?) Select your wall object turn on gizmos and hit play
Apologies for delayed response.
Thank you so much, I appreciate it. I'll check screen view more often when I playtest.
Thank you again.
Your answer
Follow this Question
Related Questions
Collision going through collider 0 Answers
Camera gets flung off of the map when the player collides with certain objects. 0 Answers
Punching a crate 0 Answers
Only take into account colliders' bounds on single gameobject in hierarchy 1 Answer
Ignore sub-colliders for center of mass in Rigidbody2d? 1 Answer