Top-down ScrollTo problem.

  • 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)

    [attachment=0:ialj010h][/attachment:ialj010h].

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ,

    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.

  • 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

  • Yes! Thank you! This sample is really close to what I want.

    Thank you very much!

    I really appreciate everyone's help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)