GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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.Posts: 12,822Member
    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.Posts: 12,822Member
    edited May 2016

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

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

    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.