camera follows the player

Get help using Construct 2

Post » Thu Jun 28, 2012 2:35 pm

hello good morning from Tenjo, Cundinamarca, Colombia, today wishes tianxxxchris eager to advance my project.

my question is how I can make the camera follow my character, anywhere in the layout
B
12
S
4
G
4
Posts: 138
Reputation: 3,710

Post » Thu Jun 28, 2012 2:42 pm

Hello, you can either add the "ScrollTo" behaviour to your character object, or use the "System: Scroll to position" action in the event sheet.

For smooth scrolling, you can use:

[code]+System: Every tick
->System: Scroll to lerp(ScrollX, Player.X, dt), lerp(ScrollY, Player.Y, dt)[/code]Nimtrix2012-06-28 14:44:36
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 28, 2012 2:44 pm

ok!:
B
12
S
4
G
4
Posts: 138
Reputation: 3,710

Post » Thu Jun 28, 2012 2:53 pm

I have not on my list " Scroll to lerp"
B
12
S
4
G
4
Posts: 138
Reputation: 3,710

Post » Thu Jun 28, 2012 2:58 pm

It is the system action "Scroll To" in which you input the system expression LERP.

You can also check the how do I FAQ at the section "Scrolling / Camera" for different ways of implementing different things.

There are also some explanations about LERP in the FAQ if you need it. (I think it is in the "Misc./general questions" section.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests