Camera Control for a Runner Game

VernallLabsVernallLabs Member, PRO Posts: 1

Hi, I am very new to Gamesalad. I used to be a member of Stencyl but it didn't meet the needs for my game.

My runner game actor runs up the screen. However, I need to keep the actor at the bottom of the screen as it runs up the scene. However, when I used the camera control to stay with the actor, I can only get it to work where the actor runs up the screen and hits the middle, then the camera stays with the actor, all while the camera is centered on the actor in the middle of the screen.

Is there a way to used the camera control whilst keeping the actor at the bottom as it runs? Thanks.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You might not need to control the camera at all: http://forums.gamesalad.com/user/browse?keywords=81.151.221.195

    I realize that's not what you asked for but it might be a consideration for how to structure your scene(s).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • JapsterJapster Member Posts: 672

    @tatiang said:
    You might not need to control the camera at all: http://forums.gamesalad.com/user/browse?keywords=81.151.221.195

    I realize that's not what you asked for but it might be a consideration for how to structure your scene(s).

    Interesting @tatiang - I went to take a look, keep getting a permissions error trying to navigate to that page mate....

  • JapsterJapster Member Posts: 672
    edited June 2017

    @jvernall14 said:
    Hi, I am very new to Gamesalad. I used to be a member of Stencyl but it didn't meet the needs for my game.

    My runner game actor runs up the screen. However, I need to keep the actor at the bottom of the screen as it runs up the scene. However, when I used the camera control to stay with the actor, I can only get it to work where the actor runs up the screen and hits the middle, then the camera stays with the actor, all while the camera is centered on the actor in the middle of the screen.

    Is there a way to used the camera control whilst keeping the actor at the bottom as it runs? Thanks.

    Not quite getting what you need, but you could perhaps constrain another (unseen) camera controlling actor (instead of the player) to the player's Y co-ord +/- a modifier, (perhaps based on speed?), and have that move up/down somewhat independently of the player to keep the player in the desired region of the camera view, if at all?

    ie, if you want the player to appear to be lagging behind the camera, you could have your invisible actor 'push' ahead to make it happen by constraining it's Y location

    i.e. to:-

       Player.position.Y + ( Player.LinearVelocity.Y/*your modifier*)
    

    ...again, possibly if he's at speed? - Where your modifier can be a set amount, or calculated on screen size etc...

    If I've got the wrong end of the stick, let me know!

  • JapsterJapster Member Posts: 672
    edited June 2017

    Just realised what you meant, whoops.... I re-read your query properly, and now see you want the character to remain at the bottom of the screen at all times, so can you not just make the camera tracking area a single pixel-high (or a few) high?...

    Again, for a smooth start, you could maybe use an invisible camera tracking actor, that the camera follows, which constrains it's vertical position to Player.Position.Y+(Screen Height/2), so it always keeps the player at the bottom of the camera region, even from the very start? (that should stop the player actor moving halfway up the screen and pushing the camera with itself centralised)

Sign In or Register to comment.