[HELP]Camera move

  • Hey guys,

    i wanted to make a camera that follows the mouse in the map,but,if i simply make the event:

    Every tick - Scroll to mouve

    the camera movement will be too fast,i wanted some way to control the scrolling speed.

    so,i tried putting an invisible object in the middle of the screen,and using a scroll to behavior in the object(the object will be called camera).Then,buttons around the screen,that once clicked:

    Left button clicked                         -Camera Y,X-5

    Mouse overlapping left button(the object)   -

    then,the object will follow the commands and go to left,the camera will follow him,and then,i have a camera scroll system.

    However,let's say i got in right edge,then,if i try hitting the left button,it will take some time until the object gets in the left side,and that shouldn't happen.

    Sooooooooooooooooooooooooooooo any ideas?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • every tick system set scroll.x to lerp(scroll.x,mouse.x,1-0.5^dt), set scroll.y to lerp(scroll.y,mouse.y,1-0.5^dt)

  • Thanks,but now i solved the prob :D

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