Platform Camera Help.

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hey everyone. I have slaved over a game for quite some time. It is just about where I want the engine to be before I start importing all the assets and and setting up the entire title. The only problem I seem to be having is with the bloody camera.

    I have it positioned where I want it, keeping the player at the bottom of the screen. I am doing this with the

    System->EveryTick--->>system->scroll to position->Player.x,lerp(player.y - WindowHeight / 4.5, ScrollY, 0.5)

    Now as I said, this keeps the player positioned toward the bottom of the window. I want this. What I want also though is for when I jump (not double jump) for the camera to not move up until I reach a certain distance from the bottom of the viewport.

    Any help with this would be incredibly helpful.

    Thanks a bunch!

    -E

  • Every Tick
       -> Scroll to position Player.X, Player.BBoxBottom - (ViewportBottom(layer) - ViewportTop(layer))/2

    Using ViewportBottom and Top is the only way I found to get the original height of the project's window.

    If you're in any scale mode windowHeight doesn't give you what you need

    The layer should be any layer number or name with a Y parallaxe of 100

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply! I work on this in a few hours and see where I get. Will update later.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)