Learn how to do the much requested screen shake using nifty trigonometric functions! Disclaimer: I kind of suck at math, so take what I say with a grain of salt.
Correction: There is a slight problem with the code. While it works, it doesn't work how I explained it. In the example given you are setting the frequency of the sine wave to be random(628), but it is not consistent between the X and Y position of our point. We wanted to express the outside of a circle, not any point in the circle.
To fix it do this: Create another variable and call it Freq. Always set Freq to random(628). Replace both instances of sin(random(628) ) and cos(random(628) with sin(Freq) and cos(Freq), which will keep the random number consistent for both formulas.
Thanks for watching!
-=Links=-
www.clickteam.com - Get Fusion!
https://discord.gg/g9UqQPW - My discord
www.incompetech.com - Amazing royalty free music
www.inkscape.org - Free SVG software
[email protected] - Contact me
If you would like to have your bugs fixed in a video send you mfa file along with an explanation of the problem
to my email address listed above.
Тэги:
#almightyzentaco #game_dev #game_design #how_to #screen_shake #trig #clickteam_fusion #fusion_2.5 #game_dev_tutorial #how_to_shake_the_screen