How do I do a camera Shake only in Y axis

0 favourites
  • 11 posts
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • Hello,

    i'm new in construct 2, and i want to shake camera only in Y axis like this exemple :

    https://vid.me/vMdi[/code:84hlmxw1]
    
    should i do it with [b]Shake[/b] (ScrollTo) or in other way, because with [b]Shake[/b] i can't controll one axis.
    
    thank you so much
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Maybe try something like this:

    Settings sine:

    [attachment=1:ww5hbkeu][/attachment:ww5hbkeu]

  • Thank you Rjan =)

    but it didn't work for me, may be i forget something.

    here is my code :

    https://www.dropbox.com/s/lireqzmb6kgw9m8/shake_cam_test_1.capx?dl=0[/code:228ifgog]
  • Hi Hunter,

    I played around a bit <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    Check out the attached capx: I also learned some things by making it <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    You don't want to give the camera the sine behavior but all the other stuff: player, solid and ground.

    Hope it helps you on your way...

    One thing to remember though: I've only been using C2 for two months, so there might be much better solutions to what you're trying to achieve.

    dl.dropboxusercontent.com/u/110 ... Shake.capx

  • You could do it like this

  • Thank you so much Rjan for your help, but i can't download the capx the link is not complete

    Lordshiva1948 : thank you man, it works, but i don't understand why now it shake only in the Y axis, did i put the ScrollTo in the wrong object ?

  • Could be swap um around and see. No harm in trying

  • yes please ^^

    here is my Capx, like the way you do it, but it didn't work for me, i really don't see the diference, but with your Capx it work just fine,

    https://www.dropbox.com/s/wtahv61xupnqcmy/shake_test2.capx?dl=0[/code:34g5792i]
    
    something missing i guess!
  • Oh right. My rep is still too low...

    Can't send url's yet...

  • Hunter I have test your capx it's weird. I am sorry I don't understand it

  • The only way I know how to do it, and force vertical is to make the Layout Width No Bigger than The Screen Width but Make the Layout Height Larger.

    If you can make the boss fight or whatever you need to vertical shake on it's own layout it'll work fine. Example Below.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)