Move Camera Origin At x Speed After x Seconds

SmokeyAce73SmokeyAce73 EarthMember Posts: 370

I'm currently working on a game and the aim of the game is to keep a ball from hitting the ground.

I have a background image at the size: 360x2400 (there are 5 different backgrounds put into one on top of each other)
I want the background to move after say 5 seconds to the next level (I have worked out the camera origin's Y would be at 480 for the second level.

I have tried
RULE
If timer >= 5 seconds
DO
Change attribute scene.camera.origin.y to 480

This does change the camera origin to the second level but it just changes, doesn't move

Best Answer

  • CodeMonsterCodeMonster ACT, AustraliaPosts: 1,078
    Accepted Answer

    yeh, what @BonepileGames‌ said. use the interpolate behaviour. so heres an example:

    interpolate
    attribute scene.camera.origin.y TO 480
    for 0.1 seconds (or how ever many seconds you like)

Answers

  • BonepileGamesBonepileGames Member Posts: 194
    edited March 2014

    @SmokeyAce73‌

    Have you tried interpolate behaviour?

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370

    Thanks for the reply, im trying that now... I've hit a stalemate though, once the background has moved once using the interpolate behaviour I am unable to move the background again

    Please advise thanks

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370

    All done thanks for your help

Sign In or Register to comment.