Actor Controlling Camera Question.

CaptFinnCaptFinn Member Posts: 1,828

Scene Size = 3480x800

Actor moves from left to right.

Actor controls camera.

The larger the camera is from left to right the longer it takes for the actor to start moving the camera.

The smallest the camera can be... the actor starts moving the camera once it travel to mid screen.

I need the actor to start moving the camera way before it gets to the center of the screen.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2015

    @FINNBOGG said:
    Actor moves from left to right.
    I need the actor to start moving the camera way before it gets to the center of the screen.

    Dump the Control Camera behaviour.

    Constrain camera origin X to self.X - (some value)

    So with an iPad landscape project if you want the actor to sit a quarter of the way across the screen (L>R) it would be . . .

    Constrain camera origin X to self.X - 256

    Or

    Constrain camera origin X to self.X - (camera width / 4)

    . . . . . . . . . . . . . .

    Camera Orgin X and Y are the bottom lefthand corner coordinates of the camera area, you can position the origin wherever you like, if you were to constrain the X and Y Origin to your actor, then your actor would always be in the bottom lefthand corner, if you use the Camera Control behaviour and close the tracking area right up as small as it will go then the 'constrain camera origin’ equivalent would be:

    Constrain camera origin X to self.x - camera width / 2
    Constrain camera origin Y to self.y - camera height / 2

    Etc etc

  • CaptFinnCaptFinn Member Posts: 1,828

    So shrink camera as small as possible and just constrain it to actors x how ever much I need. I think I gotcha.

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2015

    @FINNBOGG said:
    So shrink camera as small as possible . . .

    Not sure what 'shrink [the] camera' would mean in this context, shrinking the camera tracking area only applies to using the Control Camera behaviour and shrinking the actual camera would just zoom in on your scene . . . what I am saying is to not use the Camera Control behaviour at all and just constrain the camera's origin to the actor's position with an offset.

  • CaptFinnCaptFinn Member Posts: 1,828

    does this mean I have to unlock the actor to be able to access camera origin?

  • CaptFinnCaptFinn Member Posts: 1,828

    Unlocked it. As its falling down the pit. It looks good. But when it lands. There is way to much off screen visible.

  • CaptFinnCaptFinn Member Posts: 1,828

    You have a email I can send you this to. So you can see what I did.

  • SocksSocks London, UK.Member Posts: 12,822

    @FINNBOGG said:
    As its falling down the pit. It looks good. But when it lands. There is way to much off screen visible.

    Cryptic stuff :smile:

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited July 2015

    Move the bottom of the pit higher up so the 'off screen stuff' doesn't show. The camera has a set view box it will always show, if you don't want the off screen stuff to show you have to create the level/scene so it doesn't.

Sign In or Register to comment.