0
\$\begingroup\$

I am creating a pong clone for my first Citrus Engine project using Box2D. I've tried two types of paddles, both do not fully work.

1) Paddle is a dynamic body with a restitution of 1.0 and friction of 0.0.

Problem: The bouncing ball will move the paddle when it collides.

2) Paddle is a kinematic body type.

Problem: The paddle will not detect collision with the walls of the game screen.

Question: How can I create a paddle object that will not be affected by the collision of the ball while colliding normally with the game walls?

\$\endgroup\$
  • \$\begingroup\$ Why do you need to use a physics engine for this mechanic? It is somewhat overkill and doesn't suit the functionality a physical simulation provides. \$\endgroup\$ – Syntac_ Jan 6 '14 at 19:09
  • \$\begingroup\$ as a case study, i'd like to know how to implement this kind of mechanic for future designs. \$\endgroup\$ – theLucre Jan 6 '14 at 19:28
0
\$\begingroup\$

Try applying a Prismatic Joint to a Dynamic Body. That should stop the ball from moving your paddle.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.