The O.G. Virtual learning! Buy one, get 2 more Lifetime Memberships! - Click Here!

Ball sticking to table objects

This topic contains 10 replies, has 2 voices, and was last updated by  Kirk 5 years, 3 months ago.

  • April 11, 2016 at 9:53 pm #146487

    Has anyone ever has the ball stick to table objects vs bouncing off? I’m experiencing this issue but I can’t seem to find a pattern.

    Any help would be great.


  • April 12, 2016 at 12:38 pm #146628

    I haven’t seen that. Even with the friction up really high (which I doubt you’ve done) gravity is going to still be the dominate force.

    Have you tried showing physics in the app to see if maybe the ball is getting stuck between two objects maybe? If so, you might just need to move some elements slightly.

  • April 12, 2016 at 5:01 pm #146650

    Hmm, so this is what I have. I’ve created a really simple demo table to explore the kit. The table is composed of five textures. I set all the color sprites to the TableObject with a alpha mask physics body.

    Now the screenshot shows the ball being stuck in the ramp but it will stick on the outside of the ramp too.

    I have iOS development experience but games and sprite kit are 100% new to me. So any help is much appreciated.


    • April 12, 2016 at 5:59 pm #146655

      Love the design so far. So its a little hard to tell why on earth it would suddenly be stopping there, but you’ve got me interested for sure.

      Can you zip up the entire project and shoot it over to . I’ll take a look tonight.

      I like the start though!

  • April 13, 2016 at 12:52 am #146740

    Thanks for sending the zip over (Amazon S3 was fine) I ran it on my iPhone for a few minutes and didn’t see the ball stick to anything. Took a little video of it…

    I had the frame rate kind of low, but you can see it plays fine. And its a great little table. Reminds me of an octopus.

    Did you have the ShowPhysics property set to YES? Sprite Kit does crash after a while if you run the app with the physics showing. Some memory leak I guess, after a couple minutes it just dies. But thats every Sprite Kit project with physics showing.

    Keep me posted!

  • April 13, 2016 at 9:51 am #146747

    Thanks for taking a look and thanks for the kinds words about the table. I’m excited to get it fleshed out.

    It’s a really strange bug. I can’t see a pattern at all. Sometimes I can play the table for minutes and not see the issues and other times the ball sticks on a couple flips.

    I’ll keep everyone update to date on my progress.

    Thanks again

  • April 13, 2016 at 9:55 am #146748

    Is it getting wedged into those corners under the alley out? I was going to suggest putting something (invisible) up in there just so that doesn’t happen. The ball can definitely get stuck places like that. Which isn’t a bug, its just a possibility if you drill the ball hard enough into a tight spot.

    Also you can try tapping with two fingers and that will “tilt” the table which can free up the ball in most cases. See if that works the next time it gets stuck.

  • April 13, 2016 at 10:32 am #146765

    I don’t think it’s getting wedged. It’s almost like the ball bounces around in the wedge part too many times then sticks on the way out.

    And the ’tilt’ will free the ball about half of the time.

  • April 13, 2016 at 10:33 am #146766

    Which device are you testing on?

    • April 13, 2016 at 10:36 am #146767

      Just had another thought, those blue lines are rather thin boundaries. I wonder if occasionally Sprite Kit makes the ball go through them, so essentially the ball is stuck in the middle. Are they just for mockup purposes, the thin lines?

  • April 13, 2016 at 10:48 am #146774

    I’m testing on 6+ and yes the lines are thin because it just a simple mockup.

    I’ll make them thicker this evening and see if that helps.


You must be logged in to reply to this topic.

Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!

Uh oh, missing your affiliate ID. Create one real quick