Platform Camera Help.

Get help using Construct 2

Post » Sun Jun 02, 2013 1:26 am

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
B
2
Posts: 2
Reputation: 154

Post » Sun Jun 02, 2013 2:14 am

[code]Every Tick
   -> Scroll to position Player.X, Player.BBoxBottom - (ViewportBottom(layer) - ViewportTop(layer))/2[/code]
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 100Yann2013-06-02 02:15:09
B
66
S
22
G
14
Posts: 1,484
Reputation: 16,511

Post » Sun Jun 02, 2013 10:24 am

Thanks for the reply! I work on this in a few hours and see where I get. Will update later.
B
2
Posts: 2
Reputation: 154


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], ivanski1983 and 12 guests