I paid someone to make a shockwave effect for my game.
I have decided to release it here to the community so others can use it.
defold-shockwave.zip (379.7 KB)
To use it in your project you would need to copy the following items in:
Render and Libs directories.
Images\Logo\Logo_256.png
From the main collection… copy the postprocessing game object.
In the game project change the render to /render/render.render
Copy the code for the libraries
local camera = require(‘libs.camera’)
local shockwave = require(‘libs.shockwave’)
Then generate a shock wave using a line like this…
shockwave.new{x = x, y = y, radius = 100 * scale, duration = 0.5}
It allows upto 8 shockwaves to be generated at a time.
I am trying to get it to work with rendercam at present if anyone can help with this that would be handy.
I was told by the developer to move the render code to a new render script I would move:
self.screenquad_pred , self.rt_width, self.rt_heigh and self.target variables.
Also to copy the code from line 111 to 122 in the update method which uses render.enable_render_target() and render.disable_render_target() to capture the output into a texture.
Good luck with it…