I wanted a script to easily add vibrations to a set of points that could be generated by @Lucifie’s AddPoints or wave generating scripts.
The script takes an amplitude input, so between the amplitude and point frequency you are using you should be able to really fine tune the speed of your vibrations. (I’ve just realised I’m incorrectly using the word amplitude, what you input is actual 2x the amplitude. Half of the number you input gets added/removed from your points to generate the vibration)
It works by simply adding position to every second point, and subtracting position from every other point, which is a simple way of generating a vibration.
The script is a little rough around the edges, specifically the start and end of the selection, but when you’re dealing with rapid vibrations you won’t likely notice a stray point here or there.
My use case for this script is for generating smooth vibrations (does the idea of "smooth vibrations even make sense? lol) that can follow a pattern.
Hope this is helpful for someone out there! Any feedback is appreciated and I’m happy to answer questions about it, and if you take and modify this I’d appreciate a credit/mention in your post
Good question! I can’t look at it today but from a quick look at the release notes for 2.0.0 it sounds like the API has been updated, so it may break all such extensions. I’ll install the new version soon and play around tomorrow probably!
Yes two things were removed.
The old extension API and the even older “Custom functions” API (which you’re using in this case) was completely removed.
Sorry for the confusion.
The extension API has a little overhead when creating small functions like this but it’s worth it because once you have you can always extend it further.
The code should work with little modification as an extension you just have to wrap it in a binding.
@gagax123 Thanks for the explanation, I think I will update my post just so that it works standalone but if you want to include my code in your extension feel free to add it in
@pallokala2 I’ll make an update to the main post to support OFS 2.0 after I finish work in about 5hrs or so hopefully