# How to make a catapult work with physics and colliders?

This should be my final question regarding getting a catapult to throw something in unity. On my last question, someone suggested starting with something simpler (which I apologize for not doing earlier). It worked, so in my test project I put some shapes together to roughly approximate my catapult to see if it could throw something.

here's the code on arm rotation parent(which I made so that the arm rotated like a catapult arm)

if (Input.GetKey(KeyCode.Space))
{
}


This version rotated and pushed the ball along with it,but it didn't throw it very much. Weird things started to happen when I increased the z magnitude of the torque vector(to 5). Here are my physics settings

• Arm rotation parent
• rigidbody with interpolate on, frozen every way except z rotation
• ball guide
• kinematic rigidbody with interpolate on
• mesh collider with its shape
• floor
• default cube box collider
• kinematic rigidbody with interpolate on
• cube(this is the arm connecting the cup to the center)
• default box collider for cubes
• kinematic rigidbody with interpolate on
• ball
• sphere collider
• gravity rigidbody with interpolate on

When I spin the arm, the ball almost completely passes through the floor, barely affected by it. On the next rotation, it does the same thing. here's a gif of what it does:

How do I get the cup of the catapult to interact more accurately and completely with the ball? I increased the physics fps to 100 to see what would happen, and that didn't fix it. Let me know if you need more info, thanks!

• Have you put the physics in fixed update? I heard that can fix it sometimes. – ken May 11 at 19:00
• @ken Yes, it didn't change anything – Nathan Wolf May 11 at 20:04
• I got this problem once before. I resolved it by slowing the force down by a lot. If that doesn’t help, I might try expanding the collider size on the floor to reach much below it. – ken May 11 at 20:07
• Do you have your Rigidbodies configured for continuous collision detection (CCD)? The workarounds suggested by Ken would only be necessary if you don't have CCD enabled, but it's generally better to enable CCD than to use a workaround. – Kevin May 12 at 0:46