How do I change the camera's path to a diagonal path?

Get help using Construct 2

Post » Mon Apr 10, 2017 2:58 pm

How do I change the camera's straight path to a diagonal path... In a cut scene?

I’ve been studying this video along side with a .capx made by @Kyatric

https://youtu.be/RHVF_Utc1Sk

So, here’s this:
Image

The .capx/video explained when a one of the camera trigger is triggered by the player, the camera will enable cinematic. The event sheet (the image that's above) I just showed you is where, of course, a cinematic is enabled. The camera will move forward, leaving the player to view another area. Then go straight back to the player. Something like this:
Image

What I'm trying to figure out it this:
Image

How do I set the camera's path to go diagonal? I think that's all the information I can give for anybody to help me.
Any help is much appreciated!
B
6
S
1
Posts: 8
Reputation: 651

Post » Mon Apr 10, 2017 3:52 pm

For each x condition and action, add a corresponding y condition and action with the numbers you want.

I always like to suggest using an invisible helper camera sprite to make things easy to understand though. Just add to "scroll to" behaviour on it, and move it around as needed.
Mistakes were made.
B
52
S
26
G
108
Posts: 1,605
Reputation: 61,131

Post » Mon Apr 10, 2017 4:07 pm

@Rise 0f BETA

that code only changes the camera's x coordinate, so to move diagonally, you will have to also change the y coordinate.

There are plugins that can help do it - like LiteTween, or MoveTo. Or you can do it with Lerp, or just calculate how much to add to the y coordinate each step of the way.

In your graph you are moving 7 units on the x axis, and only 2 on the y. So each time you change x, you want to change y by 2/7 as much.

Edit: yeah, what oosyrag said! :)
B
96
S
33
G
20
Posts: 438
Reputation: 17,665

Post » Tue Apr 11, 2017 3:16 pm

Thanks for the helpful replies you guys!

@oosyrag
oosyrag wrote:For each x condition and action, add a corresponding y condition and action with the numbers you want.


I believe I know what you mean.
Image
Could this be the answer you are trying to inform me?
I tried this method out, and camera seems to move diagonally downwards... which is something I don't want. Obviously, it's something I'm not doing right. But, hey, it's a helpful start! :D My mistakes can be corrected. I'll keep on experimenting!

@AllenR
My goodness, thanks for telling me about those plugins. Probably would have save me a lot of time.

or just calculate how much to add to the y coordinate each step of the way.

Could you tell me what this method is with more details?

:D I want to collect as much information I can get with all the replies!
B
6
S
1
Posts: 8
Reputation: 651


Return to How do I....?

Who is online

Users browsing this forum: ditocruz, uzumiapps and 24 guests