How do I make Mario World style camera movement?

Get help using Construct 2

Post » Tue Oct 28, 2014 1:37 pm

There is a little bit of play where the camera doesn't follow the player. Mario can take a few steps left or right before the camera will start following.
B
13
S
3
G
1
Posts: 43
Reputation: 1,348

Post » Tue Oct 28, 2014 3:08 pm

use scrollto function to let the camera follows the player.
disable the scrollto function to stop the camera following the player.

i am unable to figure to code that mario taking a few steps before you re-enable scrollto function,
so i used x co-ordinates.

for example :
x< 400 = scrollto function disable
x>400 = scrollto function enable
You do not have the required permissions to view the files attached to this post.
B
28
S
13
G
15
Posts: 87
Reputation: 10,468

Post » Tue Oct 28, 2014 5:37 pm

Check out the "Magicam" plugin, its amazing what you can do with the camera with that.
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Tue Oct 28, 2014 7:27 pm

Will look into both of these ideas. Thanks a lot! :)
B
13
S
3
G
1
Posts: 43
Reputation: 1,348

Post » Wed Oct 29, 2014 12:41 am

Do you want the camera show more of the right screen when player moving right and the same idea when moving left?

If you only want the camera to be bit slow, do this:

Add a sprite and name it camera and add scroll to behavior

Every tic : camera set position to : lerp(self.X,Player.X,6*dt) - lerp(self.Y,Player.Y,6*dt)

Change the number "6" until you achieved what you want.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,165


Return to How do I....?

Who is online

Users browsing this forum: mariogamer, NN81, OddConfection and 8 guests