Fancy Camera 2 problems. Please help!!!

0 favourites
  • 8 posts
From the Asset Store
ready made menu you can download this one or just follow my tutorial to make it yourself
  • Hello!

    I am working on fancy camera.

    It works like: sets position between player and cursor.

    It has 2 problems:

    1) It's veeeeeeeeeery sensetive and I don't know how to smooth it.

    2) It can move too far and player will leabe the screen. I want it to stop go further on some distance from player.

    Please help

  • A capx would help to understand your problem and find a solution.

  • I was able to accidentally, but successfully recreate this. Give two objects the ScrollTo behaviour, one being the player, the other being whatever sprite. Set that second sprite to the mouse cursor every tick. Then if you move your mouse the screen will move as far away as it can from the player but also keep the player on-screen. It had smooth control as well.

  • Lerp(scroll.x, (objectA.x+objectB.x)/2,speed*dt)

    Lerp(scroll.y, (objectA.y+objectB.y)/2,speed*dt)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! But if I do 2 scroll to I have that player moves outside the screen but near it and mouse at the end of the other side. I want camera to stop moving away on the some range from player.

  • If you want it do anything other than what it's doing now, then you will have to remove the "scrollto" behavior.

    Check the manual on the scroll.x, and scroll.y expressions.

  • I am using the scroll to position with (Player.X+Mouse.X)/2

    (Player.Y+Mouse.Y)/2

    Geometry

  • Thanks a lot! Lerp helped me with all problems! Now camera is very fancy and comfortable!

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