Control camera, stay in left side the actor

Hi,

I would like if the actor always stay left side when move right. But now in the camera control max. i can set just middle of the screen.
Is it possible?

I hope it's understandable.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2016

    Place an actor into the scene to control the camera, unlock this actor so you can access the scene.camera.

    Constrain scene.camera.origin.X to player.pos.X - (scene.size.width/2) + 100
    Constrain scene.camera.origin.Y to player.pos.Y - (scene.size.height/2)

    Adjust the '+100" value to what you need.

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2016

    // double post (these new tiny edit windows are really useless).

  • rozsa.jatekfejlesztesrozsa.jatekfejlesztes Member, PRO Posts: 45

    Hi, thanks the answer. The (scene.size.width/2) is why need? When i add that the actor dissappear.
    But without work well.

Sign In or Register to comment.