[solved]Smooth Scrolling

For questions about using Classic.

Post » Sat Jul 09, 2011 11:18 pm

How to do it? Currently I'm trying to create a set of events that makes the camera pan mildly to the direction my character is facing, up if look up is held, pan a little to the right if move right is held, etc; and while I got that to work, its "snapping" immediately to the scroll location instead of smoothly moving there, making the controls feel super choppy.

I find the "centered view" on the main character very dull and lifeless and want to spice it up just a tiny bit with this method, any help is greatly appreciated.


CAP file: Help me scroll better pleasewgrace2011-07-11 02:10:07
B
3
S
1
G
1
Posts: 17
Reputation: 759

Post » Sat Jul 09, 2011 11:57 pm

I'm missing the SpriteFont plugin so I can't open it, but a good way to make it smoother is to move it in the direction a small number of pixels (maybe 1?) every X (100?) milliseconds until it is a certain distance from the player.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sun Jul 10, 2011 12:06 am

You might want to take a look at my MagiCam plugin; it features pretty much exactly what you're wanting, and it comes with examples demonstrating a similar effect.

MagiCam Plugin

I hope you find this of use!
Moderator
B
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Sun Jul 10, 2011 12:07 am

Thanks guys! I'll try both of those suggestions out. I love how helpful this community is, appreciate it.

-Edit-
Trying "every 100 miliseconds, if look up is held down, then scroll to lerp(Mainchar.Y,Mainchar.Y-75,0.05) - doesn't work.


The MagiCam plugin is AMAZING. Thanks so much for sharing that. I saw the plug-in before, but I always assumed it was something to do with webcams lol.wgrace2011-07-10 00:45:28
B
3
S
1
G
1
Posts: 17
Reputation: 759

Post » Sun Jul 10, 2011 2:53 am

[QUOTE=wgrace]
Trying "every 100 miliseconds, if look up is held down, then scroll to lerp(Mainchar.Y,Mainchar.Y-75,0.05) - doesn't work.
[/QUOTE]
Use
Always: Scroll to Lerp(ScrollY, Mainchar.Y, 0.05)
B
2
S
2
G
2
Posts: 158
Reputation: 1,366


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests