How do I follow object movement with camera?

0 favourites
  • 4 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • Hi, i want to create a platform game like geometry dash, where the camera follows the moving object.

    Example: A box moving to right, and camera moving to right also.

    I create a game where that works, because i create a box with platform behavior and the event System Every Tick, Simulate platform pressing right.

    Now i create other game that have many objects, like boxs, score sprites, live sprites, functions, and when i create the same function for the box simulate to pressing right, the box moves to right but the camera remains static.

    Whats parameter i should to change for make the camera follows the object in movement??

    Something layers?, layout?, or behaviors?

    Thanks

  • First of all dont simulate movement. The arrow keys are already bonded so you don't need to set this up.

    Go to your player sprite and add a behavior. I think it is called Scroll-To or something similar.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But i will not to use the arrow, i wil to use the touch, only for jump. The scroll to seems that not move the screen :S

  • even if you simulate the controls or not.. it wont matter... add the behavior scroll to on the player sprite and will automatically adjust the camera position to keep the player in the center of the screen or at a 100 px away from the left or right border... it wont work unless you have the layout size bigger then the game size ... you can see the game size in the left side after you pressed the name of the project in the project right side bar... youl have a width height property its automatically 800x600 if you go to layout by default its bigger... make the layout bigger then 800x600 and the behavior will work hope it helped you

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