Camera movement

0 favourites
  • 9 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • Hello all

    Aphrodite can you or anyone please show me how to make the camera move to different positions smoothly then stick every tic to the player until i move it to another place.

    My game is platform and the player will fall from height places and jump...etc.

    I'm using this global variable :

    Position = 0 --------- camera set position to : lerp(Self.X, Player.X+200, 1*dt)

    Position = 1 --------- camera set position to : lerp(Self.X, Player.X-100, 2*dt)

    ......etc

    And because of (x*dt) the camera will not stick 100% in the place.

    And if i deleted the (x*dt) or make it more less the movement between positions will not be smooth.

    Thank's for any help

  • I am not sure, but are you trying an effect like sonic 1 on master system (the camera has a max speed that sometimes is lower than the actual speed of the player), I can try to do something like it

  • Yes I believe A0Nasser means something like this:

    Subscribe to Construct videos now

    Found that video as an example.

  • Thank's for the quick replies.

    The camera will stick to the player every tic without lerp, And In some situations i want the camera to move smoothly to left or up or even more to the right then stick there.

    If i use lerp the camera will follow the player, Sometimes the player will fall and the camera need x of time to reach the player.

    And if i use the code without lerp : set camera to player.x+200 and player.y-100..for example, It will work perfectly but the problem when you move the camera to new positions, it move in 1 tic not smoothly.

    Forgive my english

    And thank's for interest

  • Any one know how to make this?

  • As I said in other posts, "the best option for whatever cam thing is the magicam plugin"

    It's possible to do whatever you want about cam movements.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank's for the information, i will give it a try.

    And i also think we can make this with some lerp cods.

  • do you mean something like this

  • Thank's for the example

    But what i need is this :

    situation 1 : Set camera to : player.x - player.y -150

    situation 2 : Set camera to : player.x+300 - player.y -150

    situation 3 : Set camera to : player.x-200 - player.y -50

    Without lerp, To make the camera stick every tick to the position.

    I want to use the lerp only when converting between cameras.

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