Top-down ScrollTo problem.

Get help using Construct 2

Post » Thu Dec 04, 2014 5:06 am

I made the player not in the center of the screen but when the mouse cursor is near the player it makes this jittery-shake. I want to stick with the ScrollTo behavior because I like the camera to shake when the player shoot. Has anyone figured out this problem? If I so, please send me the link, if not help me? I've been searching for similar problem but I haven't seen any (maybe I may have missed it)


cameraTest.capx
.
You do not have the required permissions to view the files attached to this post.
B
9
S
1
Posts: 12
Reputation: 451

Post » Thu Dec 04, 2014 5:59 am

@Smile4me,
replace:
'player: set angle toward (Mouse.X, Mouse.Y)'
with:
'player: rotate 360*dt degrees toward (Mouse.X, Mouse.Y)'
Your first expression sets the angle instantly, hence the flipping.
You can experiment with the amount of degrees to vary the speed of rotation .

Have fun
B
19
S
2
G
1
Posts: 24
Reputation: 1,475

Post » Sat Dec 06, 2014 8:07 am

@moonworX,

Thanks, it works!
Although, it gives me another problem. I can't move in reverse because the player flips toward the directional button I press. I want the player to constantly facing the cursor and be able to move while facing the opposite direction.

I'm looking for another way to make it happen by making offset of the object from the center of the camera. But I haven't figured it out yet.

I really appreciate your help. :)
B
9
S
1
Posts: 12
Reputation: 451

Post » Sat Dec 06, 2014 11:56 am

Here's another example you can use.
The scrolling is smoother and (sorry for my english) "depending on the distance" (is this right?! *gg*)

You'll see what i mean ;)
You do not have the required permissions to view the files attached to this post.
B
22
S
6
G
2
Posts: 185
Reputation: 3,632

Post » Sat Dec 06, 2014 10:10 pm

[quote="Cherico"]

Yes! Thank you! This sample is really close to what I want. :)
Thank you very much!

I really appreciate everyone's help.
B
9
S
1
Posts: 12
Reputation: 451


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests