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

Table Floor larger than scene size

Home 4 Forums iOS / tvOS Starter Kits The Pinball Games iOS and tvOS Starter Kit Table Floor larger than scene size

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

  • April 11, 2016 at 5:45 pm #146418

    I’m creating a game in which the table floor is actually about twice as big in both the horizontal and vertical directions as the scene size on an iPhone(1080×1920). I want the camera to follow the ball, which it does. However it allows the scene to scroll past the boundaries of the floor, this giving me “blank” area with no image. Is this something that can be done with the kit?


    Ken Walker

  • April 11, 2016 at 7:32 pm #146440

    Hmm, are you asking whether you can limit horizontally where the camera goes when tracking the ball?

  • April 11, 2016 at 8:50 pm #146471

    Yes, both horizontally and vertically. I found the ‘cameraLowestPoint and cameraHighestPoint variables and those seem to do the trick for the vertical. I have added cameraLeftMostPoint and cameraRightMostPoint and am adding a check for those in doCameraTracking(theBall:Ball). And looks like I’ll need a moveCameraLeft and moveCameraRight.

    If this seems like the right path I’m fine with that, just wanted to know if there was something already built in.

    • April 12, 2016 at 12:40 pm #146629

      Actually I was going to suggest exactly that. I like the properties names. If you want to email me the code you added I can take a look. If its working though, that sounds great. And I can make it official in the kit.

  • April 12, 2016 at 12:54 pm #146630

    Thanks,sounds great. almost working now. I’ll email you the proposed code when I’m done. Might be a few days, got some honey-do’s coming up

  • April 13, 2016 at 12:12 pm #146802

    Got it finished and working, but can go two different ways.

    I can add properties to the table for the max and min camera location and deal with it in that fashion


    I can calculate the values based upon the dimensions of the floor and the dimensions of the scene

    I’m guessing the property value approach is more in keeping with the tone of the kit, but I would need to add two property values per device type.

    What do you think?

  • April 13, 2016 at 1:38 pm #146821

    Never mind. I’m going the way of the properties.

    • April 13, 2016 at 1:39 pm #146826

      Good idea. Yeah, two per device probably.

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