Lerp Camera and Mouse Look

0 favourites
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • There isn’t a distance limit so you just have to play with the numbers.

    Basically it’s a mix between the acceleration and spring stiffness. When the spring is stretched far enough it will counteract the acceleration.

    The damping makes it less springy. Set it to 0 to see it bounce all over. The damping slows it down.

    320 and 240 were just half the 640,480 window.

    I used the layout size to limit the position we use to the scroll area. It’s not needed if you had unbounded scrolling.

    The a and d variable are just the angle and distance from the camera to the mouse.

    There’s always some feature I forget about with my examples. You may still be about to use screen shake after you set the mouse position. Or we could do our own with some random values added to the scroll position.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)