Table Floor larger than scene size

Home 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 at CartoonSmart 7 months, 4 weeks 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?

    Thanks,

    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

    or

    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.

You must be logged in to reply to this topic.