Screen shake effect not working

patapplepatapple Member Posts: 873
edited August 2012 in Working with GS (Mac)
Hi,

i just followed the tshirtbooth tutorial to create a screen shake effect and it doesn't work on my current project. If i copy exactly the same rules in a blank project, the effect works perfectly!

Is there any other option that maybe I turned off in my current project?

Comments

  • mithraweptmithrawept Member, PRO Posts: 167
    Are you doing something like constraining the camera origin?
  • patapplepatapple Member Posts: 873
    Yes, i am interpolating it
  • mithraweptmithrawept Member, PRO Posts: 167
    Are you applying the constrain in the scene or from a game wide actor? Interpolating the camera origin can only be done at scene level. If you create a blank actor, add the actor to the scene, then put the code in that actor to interpolate the camera origin. See if that works.
  • patapplepatapple Member Posts: 873
    @mithrawept i was interpolating ghe camera rom another actor with some other rules and it didn't work. Now i tried to put this rules in a blank actor in my scene but it doesn't work.
    An actor collide with another and it turn the game shake attribute to true.

    I don't think so @tshirtbooth

    What is the problem?
  • patapplepatapple Member Posts: 873
    no idea?
    here are the rules:
    image
  • patapplepatapple Member Posts: 873
    edited August 2012
    @uptimistik sorry man, but your project works perfectly but if I copy EXACTLY the same rules in my project they don't work. I saw that my shake attribute is triggered to "true" and also after 0.6 is triggered to false but the rules are not run. I have no idea about this :((
  • patapplepatapple Member Posts: 873
    @uptimistik sure man :)
  • patapplepatapple Member Posts: 873
    edited August 2012
    Big thanks again to @uptimistik
    After around 30 minutes of screensharing we realize that my actor was in a "no scrollable layer" :))
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Yep, that'd be your problem.
  • overzero3overzero3 Member Posts: 18
    So...i guess that this shake effect only works with games that have a fixed camera, right?
    I'm doing a dual-stick shooter and the player actor has a Control Camera behaivor, so when the player is from a distance from the origin point and the shake effect kick in, the camera go crazy and shake a lot more than when it's near the origin.
    Is there any other way to make this shake effect without a fixed camera?
  • LiquidGameworksLiquidGameworks Anchorage, AKMember, Sous Chef Posts: 956
    It works fine with a moving camera. What you'll want to do is track where your camera origin is "supposed" to be, and base the shaking off that. Make two real attributes, and call them CamX + CamY. Just prior to the shake, change CamX to Cam Origin X, and CamY to CamOrigin Y. Then, use the CamX/CamY in place of the camera attributes in your shake rules. At the end of the shake, have the Cam Origin interpolate back to your CamX/CamY. That should keep it from being wonky when far away from 0,0.
  • overzero3overzero3 Member Posts: 18
    Hum...it didn't work! It shook so fast that you barely notice. And to be honest, i don't think I quite understood it too.
    So, this Scene.Camera.Orign is the camera origin in the scene, right? In this case is 0,0.
    So when I use a change attribute before the shake effect I'm changing the new Camera X/Y attribute to 0,0 right? And when I interpolate it back to Scene.Camera.Origin I'm once again changing it back to 0,0, no?
    I'm sorry, I'm probabily sounding really stupid, but I still didn't got my head around it!
Sign In or Register to comment.