Screen shake effect entity

This entity makes it easy to create screen shakes used for example when something explodes or an earthquake is shaking the world.

Installation and use:

1. Import the package by right clicking on Entities in Glue
2. Drag the entity onto a screen to create an instance of it there.
3. Attach the camera to the screenshaker. In your screen CustomInitialize:

MainCamera.AttachTo(ScreenshakerInstance, false);

(MainCamera is an exposed object of the FRB camera in Glue. You could probably use SpriteManager.Camera instead if you want.)

4. If you want the camera to follow something you can set a follow target on the screenshaker. Put this in your screen CustomInitialize for example:


5. When you want it to shake or not just set ScreenshakerInstance.ScreenShake to true or false.

You can set the ShakeFrequency and ShakeMagnitude variables in Glue to customize the effect.

Product File: 
Syndicate content